Excal's Recent Forum Activity

  • <img src="http://i.imgur.com/KY4qh3H.png" border="0" />

    I have it so that after the enemy is created, it has its firerate and fire set, so yes.

  • <img src="http://i.imgur.com/8wYgTDZ.png" border="0" />

    Now the enemies aren't firing at all :/

    Do I need to be picking each instance? I tried a For-Each and ran into the same problem.

  • Pixel, that makes perfect sense, thank you!

    As for my sharing my .capx file, all art assets I'm using is placeholder anyway so I'm fine sharing it for now.

  • Here's my project file in case you want to look.

    SpaceGame.capx

  • Interesting examples, but I'm not sure how to apply it to my program.

    I don't have a global variable that allows you to "artificially" set variable firing rates, I have enemies on screen that equal the current wave (level) and each enemy should be firing at a different rate. I am not given the luxury of using a global variable to divide by, as I need the firing rates to be random.

    If you take a look at my screenshot above, you can get a general idea of what I am trying to do. I need the enemies to be firing equal to their fire rates.

  • They're still firing at the same rate. What you have essentially done is change which ones fire.

    I need all my enemies to be firing, but at different rates.

  • I have an instance variable that stores the fire rate for each instance. This instance variable is assigned a value every time the object is created, but I'm still having the issue where the objects fire at the same rate.

    <img src="http://i.imgur.com/YgfiIIb.png" border="0" />

    Can't think of another way that 'should' be correct, and what I have isn't creating different fire rates. Anyone have any ideas?

  • Here's an update of what I've done based on vee's feedback, but now I'm getting the issue where one enemy ship seems to be firing and the others don't fire at all.

    Occasionally I get the error where enemy ships have a fire rate that is insanely high, like 0.1 or something, which shouldn't be possible because the default fire rate is zero. Any ideas why this might be happening?

    <img src="http://i.imgur.com/OmhMRfr.png" border="0">

    SpaceGame.capx

  • I don't think that solves the problem, because in essence that's exactly what I have already done that isn't working.

    I'm setting the firerate in the For-Each loop that creates each ship sprite.

  • I think I have to go through each particular instance after the enemies are created and set their fire rates that way, but separating the 'For Each' outside the 'Repeat' loop still causes them to all have the same fire rate because I'm not sure how to set the instance variable only for instances that haven't already been set.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Do you mean like this?

    <img src="http://i.imgur.com/BIlWWAa.png" border="0" />

    Sorry, I'm not entirely sure what you mean. I'm still getting the same rate of fire on all of them :/

  • Maybe it's just me, but they all seem to fire at the same rate?

    SpaceGame.capx

Excal's avatar

Excal

Member since 9 Mar, 2013

Twitter
Excal has 1 followers

Connect with Excal

Trophy Case

  • 11-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

13/44
How to earn trophies