It's because you're picking the hurtbox and then destroying a hurtbox and enemy so the hurtbox is picked correctly as the one you jump on but then you are saying destroy all enemies. You can fix it by putting the hurtbox in a container with the enemy and remove the destroy enemy action. This will then destroy the hurtbox but also the enemy that is attached to it. Another way is to relate the hurtbox to the enemy with a variable ID and destroy the ones that match but a container should be easier.
yes the duplication can occur as it can pick the same fire rate. The timer, you start counting down when something happens. Then an event 'on timer' activates when the timer finishes.
Yes it's choose(1,3,4) to pick one at random, if that's what you want?
Again, all I'm trying to do is make different instances of the same object fire at consistently different rates I could set.
Well I've done it here in 2 events. https://www.dropbox.com/s/uwzrvqdh2tlu9 ... .capx?dl=0
I did it two ways, you can either set the timer wait period to the fire rate, or you can set the speed of the bullet to the fire rate. Both have the same outcome.
If what you want is for all t1 to fire at the same changing fire rate and all t2 to do the same etc, then you can split out the family event into the 4 types of ship.
You can set the instance variable to a random value, it's random(x,y) to pick a random value within a range or choose(x,y,z) to pick one from many.
Anything is possible, just explain exactly what you want to happen.
This one picks a ship at random, and each ship type has the same assigned fire type. https://www.dropbox.com/s/so9p2jdpzbsse ... .capx?dl=0
You can't instruct people not to buy C3 and C2 lol.
Do the events have to be run in order one by one for any particular reason? You could just have them act independently by giving them their own states for what they're currently doing.
Develop games in your browser. Powerful, performant & highly capable.
There you go https://www.dropbox.com/s/4u3skfkbf1612 ... .capx?dl=0
The logic can be tidied up even more with a function, it really depends on what randomness is supposed to happen.
I do this by setting a variable with choose, so choose(1,2,3,4,5,6,7) will choose one of those numbers at random. Then the number chosen relates to a platform. If var=1, spawn platform 1, if var=2 spawn platform 2 etc.
Yeah looks okay, its working, right?
I'm not sure what you're doing here, setting a global variable to itself? You might be setting experience on start of layout somewhere.
Member since 5 Aug, 2013