make an object stop following a player and move to

Get help using Construct 2

Post » Sun Mar 24, 2013 8:14 pm

hey im new to all this, i am trying to become a useful team member and create a game with a few other people,
im failing right now.....

all i want to do is make it so this object will stop following a player around the screen if it gets close to a black hole, then i want it to move to the center of the black hole, simple really????................
anyone got any suggestions?? please? anyone...
B
4
Posts: 2
Reputation: 344

Post » Sun Mar 24, 2013 8:40 pm

Maybe try this:
add the bullet behavior to your object (which may very well be already the case)

condition : If object on collision with black hole -> set angle toward Position of black hole (X/0.5*blackhole.width ; Y/0.5*blackhole.heigth)

to prevent the mechanism of following the Player to kick back in you can maybe add a variable to check if the instance has collided with the black hole and well...stop this mechanism if this variable is true...

If you want to destroy the object in the middle of the black hole you can check if the coordinates of the object match the blackhole coordinates as above.

Can you describe the mechanism wich is used to track the Player further? (since you probably can use the same mechanism to track the middle of the black hole)JohnnyF2013-03-24 20:45:51
B
4
S
1
Posts: 5
Reputation: 485

Post » Sun Mar 24, 2013 8:51 pm

cheers,

i have added the bullet mech to my enemy sprite along with "set angle to player" so it will slowly move towards the player no matter where it is,

elsewhere i have added "enemy>on collision with black hole> set angle to black hole" i was hoping this would work but i need to find a way to "de-activate" the original "follow player" scripts but i can figure out how,

also it might be worth mentioning i only started using construct 2 this weekend, im a pure bread noob


http://gyazo.com/84a218af0a2fb3af224c1851a7bd566e - here's a screen shot
B
4
Posts: 2
Reputation: 344


Return to How do I....?

Who is online

Users browsing this forum: SpartCrafter, Yahoo [Bot] and 25 guests