Lua:AddSchedule
From Fortress Forever Wiki
Jump to navigationJump to search
|
IsPlayerA schedule waits for a period of time, then fires a lua function. UsageAddSchedule(schedule_id, duration, function, ...) Inputschedule_id(string) Gives the schedule a name duration(float) number of seconds the schedule will wait before firing function(function) the lua function that will be activated ...(object) OPTIONAL. Any further parameters will be passed on to the target function OutputReturns nothing. ExampleAddSchedule must refer to a user-defined lua function. AddSchedule( "my_schedule", 3.3, DoSomething, "hello") --This function can be defined anywhere in the file--wherever is convenient. function DoSomething (myString) --myString now equals "hello" --Do other stuff end |