![]() |
Do triggerserver() And onActionServerSide work in a class?
I made a class, first time i used classes, and in the end it also appeared to be a totally out of the way of achieving what i wanted.
But the reason i gave up on my class, and used a weapon, was because i couldn't get my triggerserver to work in the class, and im 100% positive that it was the triggerserver, or onActionServerside that wasn't working, because in the function that i had the triggerserver, i made my player say something, and he said it, if i pasted it in any part of the onActionServerSide, he didn't say anything. |
Yes and no, to answer the question in the thread title. Classes can also be joined to weapons, so theoretically, it works in classes. But it doesn't in level NPCs. You will have to do something along the lines of this:
PHP Code:
- you need a shape on the serverside (I usually add the same on the clientside too) - the action may not be named "Serverside" or "Clientside", that won't work |
^ Such a method is unreliable in certain circumstances, it should be noted. Triggeraction triggers the first NPC it 'finds', so if there is an NPC on top of the class it will capture the triggeraction, even if it doesn't do anything with it, and essentially break the NPC that was relying on it.
|
onActionServerSide should work fine in classes.
|
Quote:
Oddly enough, it seems to just get worse over the years, maybe with each release, I'm unsure. I remember it used to work just fine. Now it almost never does. |
I've made a NPC in a level, a sign in this case, and all it does is connect to the class, then in the class i have both the triggerserver, and the onactionserverside.
I wasn't even sure if i was making the right use of classes tho, never used them before. |
Quote:
|
I've had problems with onActionClientSide in a class at some point but it was more a problem of the clientside part not loaded yet.
|
Quote:
|
Quote:
|
Quote:
|
Well, all I know is that triggering between client/server in level npcs with classes almost never works anymore.
|
Quote:
|
Quote:
|
Quote:
|
All times are GMT +2. The time now is 08:09 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.