Posts: 221
Threads: 23
Joined: Dec 2008
Reputation:
0
Hello, I working on doing a firework script for Halloween but needs some help with Timers. I'm a newbie in scripting and would be really thankful if someone could give me a example.
It's going to send flares every 2 seconds and don't really know how to do..
Posts: 81
Threads: 16
Joined: Sep 2007
Reputation:
0
forward fireworks()
public OnGameModeInit()
{
SetTimer("fireworks",2000,1);//2 second looping timer
return 1;
}
fireworks()
{
//what happens when timer goes off
flare1 = CreateObject(354,X,Y,Z,0,0,0) //set X , Y, Z to cordinates you want
MoveObject(flare1,X,Y,Z+30,speed); //set speed to speed of the fireworks going up
}
Posts: 221
Threads: 23
Joined: Dec 2008
Reputation:
0
I got a other issues now, the timer seems. It's goes out flares 30m up in the sky where ever i goes. :/