player>create actor>script editor
- Code: Select all
launchbomb = 15;
key down>space>script editor
- Code: Select all
launchbomb=launchbomb-1;
if (launchbomb>0);
{
CreateActor("bomb", "bomb", "(none)", "(none)", 0, 0, false);
}
launchbomb = 15;
launchbomb=launchbomb-1;
if (launchbomb>0);
{
CreateActor("bomb", "bomb", "(none)", "(none)", 0, 0, false);
}
Goettsch wrote:I am not so good in scripting,know someone what is wrong in this script
skydereign wrote:I'd say it is that the keydown event is set to repeat, and therefore you fire all 15 shots within half a second.
lcl wrote:Also, you are not supposed to have a ";" after if-statements.
Goettsch wrote:Thanks,but it works with the ; too.
if(x<0);
{
// this will always run, even if x>=0
}
Users browsing this forum: No registered users and 1 guest