how do i get the state machine for the shooter

1 favourites
  • 3 posts
From the Asset Store
State Machine
$10.99 USD
State Machine is a great tool for managing the state of anything in your game.
  • hello does any know why the enemy keep freezing their animation and sometimes just out right stops working while their shooting? for context i have an enemy with a state machine for when it shoot using just the bullet behavior for the shooting. when i enter the shooter los it is a gamble as to whether it shoots or not. then lets say it does shoot it will either shoot a couple time then freeze until the player leave the los then can never shoot again because it will freeze thank you

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It looks like events 10-17 are running on every tick? In this case using "wait 2 seconds" there is a very bad idea. This can explain why the game starts lagging and freezing. After a few seconds there will be hundreds of delayed actions which will start to trigger and change the "state" value uncontrollably.

    Use Timer behavior if you need to do something with a delay.

    Also, random(2,2) will always return 2. You need to use choose(1,2)

  • dop2000 i probably should have been more specific my bad the problem isn't the game lagging it the just the enemy alone and it not lagging it is just not working. this should better explain it

    dropbox.com/scl/fi/vlwf5bpvf24toalzff88o/give-away.c3p

    as for the timer behavior I'll look into maybe having wait action will be problem when their more instance of the enemy

    as for the random number thing i know it just for testing

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