0 Favourites

Help with events

This forum is currently in read-only mode.
  • Hey, noobie here... I have a couple of questions for you guys. Is it possible to make a sprite follow another sprite? I can't seem to find the action(s) for it. I heard you needed some special coding program for that or something. Also, can I make it so that there can only be a number of a certain sprite on the screen? Thanks peoples!

  • this?

    Always: set Sprite.XY=Sprite2.XY

    but it means that one sprite would be over another.

    if you mean follow like one character to another, then i think you could write 1st sprite positions to variables or array. Or 1st sprite can spawn objects then 2nd sprite would follow by this path.

    To have limited count of similar sprites you can use

    1 "if sprite.count greater or equal to XX then stop, else spawn more"

    2 "if sprite.count greater than XX then destroy one (by random or by some pick)"

  • With path finding:

    http://dl.dropbox.com/u/6660860/followw ... inding.cap

    In this example the follower sprite has the RTS behavior attached, and is always commanded to move towards the player. Note the wall has the solid attribute checked, this tells the RTS behavior to avoid it.

    Without path finding:


    This has no path finding OR collision detection, you can do the same thing with collision detection using the Custom Movement behavior and the bounce action.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • NugMan Can you explain to me how you did "Always: set Sprite.XY=Sprite2.XY" please? I'm kinda new at all this stuff. I'm attempting to make a short Metroid game. I'm making a charge beam attack, but I don't know how to. I made the animation, now all I need to do is make the charge beam sprite overlap the arm cannon of the sprite (Samus).

    Citnarf Oh, I'm sorry... What I meant was I want the follower to always be overlapping the sprite, not following in it. Thanks though, this might come in handy for the future.

    EDIT: Nevermind guys! I got it But can you explain to me how I can make it so that only ONE of a certain sprite can be on the screen?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)