0 Favourites

Help! Pathfinding and Spawning Issues!!!

  • I am currently producing a tower defense game but I am having a problem with my enemies spawning. For some reason rather than waiting 1 second and checking if Enemies Remaining is not equal to zero it is spawning the enemies continuously. As well as this problem, I can't seem to stop my enemies from clipping the corners that are created by invisible wall that are opaque and on another layer.

    Also having another problem now the pathfinding and spawning is completely broken even defaulting to every 2 seconds

    [quote:206k4q9m]https://db.tt/rNlAJQ9v

  • can you provide a .capx so we can help you?

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • ok the problem is in the event :

    System EnemiesRemaining = 0,

    Go sprite Is Ready System

    set EnemiesRemaining to WaveNo * 3.

    I will explain what is wrong with this; In the event that "spawns" your enemies you are doing this:

    System Every 1.0 seconds

    System EnemiesRemaining =0

    System set EnemiesRemaining (EnemiesRemaining-1)

    so when this condition gets to 0 the event mentioned before sets the variable to WaveNo*3 so it will never becomes 0. You will have to find other way to update your EnemiesRemaining for each level. Hope it helps

    Edit: I didnt realize and you toggled some events off but not quite correctly, delete or toggle the DEBUG events correctly or you will keep the strange infinite create object behaviour you are having right now.

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
300 118,426
blackhornet's avatar
blackhornet
Unread hot topic
0 Favourites
Spam issue
201 16,836
Tom's avatar
Tom Construct Team Founder
Unread hot topic
157 12,693
megatronx's avatar
megatronx