Different fire rates for different instances

0 favourites
From the Asset Store
Adjusting the game screen for different resolutions (Letterbox scale)
  • Basically you want a random range for your fire rate,so I suggested set a range for each enemy type...and if you want variation in that...subtract a random amount from the initial value upon creation...

    There should be nothing wrong with the way you are randomising the value....but it does not appear to be working for you...not sure why.

    I believe values on creation can be missed due to the way C2 runs it's events sometimes...maybe try a wait 0.1 after creation see if that helps.

    as I saiid it appears to work here.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here is an old example you should be able to apply in your situation:

    Gun example

    If you take the first few events and simplify them for one weapon, you'll have what you want. It's basically the same idea as before, you'll add dt to a variable until it is greater than the fire rate, when it is the gun fires. Then you set the variable to 0 and start all over again.

    Like I said before, you are missing the 'for each enemy' from the point where enemies fire; if you don't have 'for each' every ship will take fire rate variable from the first instance of enemy ships. :)

  • Thanks (again) vee!

    I actually was able to piece together a solution just before your post, haha. I am just now getting used to using dt (it's not really a 'natural' thing for me to think of using yet), so bear with me as I slowly learn more of this advanced stuff.

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