![]() |
Scheduleevent/trigger class
I've got two small questions:
1) Can I start a scheduleevent Clientside and run it Serverside? Example: PHP Code:
I know about: "triggerserver("gui",this.name,blabla); But how do I trigger a class using triggerserver? "class" instead of "gui" doesn't seem to work. |
1) No.
2) Errr? I don't think you know how classes work. When a script is joined to a class, that class becomes a part of that script. |
Quote:
2.) You don't "trigger" a class in the traditional sense, you must first join the class to the script so you can trigger it. This is how classes work, by the way: PHP Code:
PHP Code:
|
Classes are like code that is copy-pasted into an object when you join the class to it. Though the OnCreated() in a class is run at the time it is joined to an object.
|
Yeah, as aforementioned, a class doesn't actually exist.
Strictly speaking, a class is just flat text. Either you join the class to a weapon, or to an npc. Then, you can either trigger the weapon (with triggerserver) or the npc (with triggeraction and the coordinates of the npc). |
For #1, try something like this:
PHP Code:
|
Thanks :D
Now I know what classes are. Well, I was just a little confused because of "putnpc2()", but now I know that putnpc2 creates an empty NPC where you put in a "class". |
| All times are GMT +2. The time now is 05:55 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.