Blockland Forums > Modification Help
Time event?
David819:
How do i do a time event like burn player that burns you for the amount of time you put in?
Dante77:
delay events
0 onactivate>player>burnplayer [ time goes here (seconds) ]
if you wanna do something else like paint a brick blue for 3 seconds then back to normal
delay events
0 onactivate>self>setcolor> blue
3000 onactivate>self>setcolor>[color it was before being blue]
in the delay box the time is in miliseconds so 1 sec = 1000 ms 3 secs = 3000 ms
mp7964:
He means with TorqueScript, not with actual events.
Look in to schedules, that's what you need.
Swollow:
--- Code: ---function BurnPlayer(%Client,%BurnLoops)
{
if(!isObject(%Client))
return;
if(%BurnLoops < 1)
return;
if(!isObject(%Client.Player))
return;
%BurnLoops--;
%Player = %Client.Player;
%Player.AddHealth(-5);
%Player.Burn(1);
Schedule(1000,0,BurnPlayer,%Client,%BurnLoops);
}
--- End code ---
--- Code: ---BurnPlayer(FindClientByName("Name"),5);
--- End code ---
I don't really know what you were asking for but I figured it was something along the lines of this, if not please attempt to explain yourself better
otto-san:
It's either on a loop like said above or activated then de-activated by a schedule.