0 Favourites

make an object stop following a player and move to

  • 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... <img src="smileys/smiley9.gif" border="0" align="middle" />

  • 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)

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • 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 <img src="smileys/smiley36.gif" border="0" align="middle" />

    gyazo.com/84a218af0a2fb3af224c1851a7bd566e - here's a screen shot

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
564 105,215
rexrainbow's avatar
rexrainbow
Unread hot topic
167 14,500
DMT2005's avatar
DMT2005
Unread hot topic
0 Favourites
[plugin] Youtube player
175 20,544
rexrainbow's avatar
rexrainbow