Enemy doesn't begin to move until after first player death.

0 favourites
  • 10 posts
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • Could somebody please explain to me why the following tidbit isn't working?

    tidbit isn't working (the actual part is at the lower end, but I thought posting the whole might be easier to debug)

    Essentially, I want the enemy sprite to constantly move from to the lower position at Y=470 to the higher one at Y=232 and back again.

    This part however, only fires after the first player death and only in the first direction (470 to 232).

  • Look at the pathfinding demo again, & read the manual. You can't call 'Move along path', until 'On pathfinding path found' is triggered.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks. That helped. Now I just need to find a way to control the behaviour. Above script doesn't really work the way I imagined it.

    EDIT: Sorry for being so "nonchalant", btw. The game is an entry for a contest that is going to end soon, so I'm in a bit of a rush.

    EDIT2: Above question is still valid, but I'm using waypoints now. Which bears another question. Is there any way to set the UID inside both, condition and action? Say if enemy sprite is at Waypoint UID 97 and should thus move to Waypoint UID 98. Is this possible somehow?

  • You can always 'Pick by UID' - you may need to 'Pick all' first to reset the pick-set.

  • Is that available for actions too? I usually pick that one, but only for conditions.

  • No, you add a subevent to do your Picks.

  • Could you give me a quick example? I can't quite seem to wrap my head around this.

    Having the sprite move from down to up and up to down couldn't possibly be that difficult, could it?

    EDIT:

    Shouldn't this work? What am I missing? I also tried a stop action on arrival/after traversal of the path. To no avail. It only traverses upwards, then stops there.

  • If you just want to move up and down, I recommend lunarray's LiteTween plugin.

    It's extremely useful.

  • Thanks.

    Looks good. But also less "random".

    Moving up and down isn't the only thing either. I have another enemy that is supposed to run in circles. Really wish there was an easy way to just have the sprite follow a pre-set path.

    EDIT: I think I found the culprit. For some reason, the sprite never fully moves to the Y position. Not sure how to fix this though.

    Please. Is there no one with a solution? I only got 4 days left to hand this hand. It's really stressing me out. Can't believe how inflexible Construct 2 is in regards to waypoints

    I mean. All I want is have the sprite move on a predefined path. Is this so much to ask for?

  • Got it working with "bounding boxes" (sprite rectangles covering a certain area + path change on overlap with those), for now.

    I'd still be interested to know why the sprite is never truly traversing to the exact point set, even though nothing is blocking its path.

    I also feel like there should be a more direct way handling UIDs/IIDs inside an action. Something like "Sprite.UID.430" where 430 is the UID. Or possibly "Sprite.UID (430)", for easier separation of object properties.

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