by LadylexUK (Jan 2015)
Copied from ProjectSpark.com
Question: How can I get an object to shoot fireballs every 3 seconds that last 1 second?
Answer:
The answer given was actually wrong at the time.
when: do: shoot, launch frequency, 3, lifetime, 1
This does not work because launch frequency is the number of projectiles per second. So this code actually fires 3 fireballs every second.
The Kode you actually need is
Code:
WHEN DO [shoot][launch frequency][0.3][lifetime][1] // the launch frequency is fireballs per second. So 0.3 is 1/3 of a fireball, so if fires one every 3 seconds
or alternatively, if you cant work out the fraction (or the number is too long for Spark and is more than 3 decimal points (7 seconds for example is 0.14285714)) use this:
Code:
WHEN [countdown timer][3][loop][trigger on start] DO [shoot][lifetime][1] // where the countdown timer number is the amount of seconds between shots