Author Topic: How To Make A Schedule With Scripting  (Read 2812 times)

ONLY READ IF YOU KNOW HOW TO SCRIPT AND HOW TO MAKE SCHEDULES ON EVENTS

Step one: Add "schedule("
Code: [Select]
schedule(
Step two: Add the amount of waiting
Code: [Select]
schedule(time
Step three: Add ",0,"
Code: [Select]
schedule(time,0,
Here comes the tricky part. Step four: Add the script part.
Code: [Select]
schdule(time,0,script)BUT WAIT... there's more to that part. If the script is like a messageAll or commandToServer... it goes something like this.
Code: [Select]
schedule(time,0,messageAll,"","msg goes here")or
Code: [Select]
schedule(time,0,commandToServer,'cmd',"blah blah I think you got the point now.")

Hope this helps ya.
« Last Edit: September 19, 2008, 04:19:58 PM by Club559 »

Thanks, most likely never use it, but thanks anyways.

You forgot object schedules and how to use cancel(%sched);.

Code: [Select]
%obj.schedule(1000,delete);
No zero specifies it as an object schedule, it'll be automatically cancelled if the object is deleted.

You forgot object schedules and how to use cancel(%sched);.

Code: [Select]
%obj.schedule(1000,delete);
No zero specifies it as an object schedule, it'll be automatically cancelled if the object is deleted.

I was just a begginer. I didn't have any idea what that second part was, so I just made it 0.
Also I was only using commandToServer and messageAll as tests.

Its probably not a good idea for a beginner to try and teach people how to do stuff.


Yeah, it works, but there's plenty more to it that you don't understand yet. You're basically teaching it wrong.

I was just a begginer. I didn't have any idea what that second part was, so I just made it 0.
Also I was only using commandToServer and messageAll as tests.
You use the zero when you aren't using an object schedule.
The difference is:
schedule(time,0,command[,args]);
obj.schedule(time,command[,args]);
Ex:
schedule($GameTimeout,0,loadnextmission); (Not a real arg, and probably not a real command. This does loadnextmission(); after $GameTimeout miliseconds.)
%col.schedule(1000,kill); (Performs %col.kill(); after 1 second.)