AI Help Needed
astreet1211
Member Posts: 4
Hello everyone!
I am new to game salad and am currently working on my first project.
What I want to happen is....
My enemy's come down from the top of the screen at random locations.
Then they move to a waypoint I have set up around the middle of the screen.
They then move to the player’s location.
I have all of that working except once the first enemy hits the waypoint they all just start moving to the player’s location.
The rule I have set up for the movement goes like this...
If "waypointcheck" = 1
Then
---------------------------------
Move to player.x , player.y
Else
----------------------------------
Move to waypint.x , waypoint.y
I also have a rule that states...
If the enemy collides with the waypoint then waypointcheck = 1
I understand that once the first enemy that hits the waypoint it changes the waypointcheck for all the enemy’s.
I just don’t know a way to change the waypointcheck for the individual enemy’s
----------------------------------------------------------------------------
NOTE: the enemy spawns are all one actor coming from a spawner.
I am new to game salad and am currently working on my first project.
What I want to happen is....
My enemy's come down from the top of the screen at random locations.
Then they move to a waypoint I have set up around the middle of the screen.
They then move to the player’s location.
I have all of that working except once the first enemy hits the waypoint they all just start moving to the player’s location.
The rule I have set up for the movement goes like this...
If "waypointcheck" = 1
Then
---------------------------------
Move to player.x , player.y
Else
----------------------------------
Move to waypint.x , waypoint.y
I also have a rule that states...
If the enemy collides with the waypoint then waypointcheck = 1
I understand that once the first enemy that hits the waypoint it changes the waypointcheck for all the enemy’s.
I just don’t know a way to change the waypointcheck for the individual enemy’s
----------------------------------------------------------------------------
NOTE: the enemy spawns are all one actor coming from a spawner.
Comments
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
I'm glad it was that simple
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page