![]() |
triggering beetween wnpcs
Well, I've been experimenting, but I can't get something like this to work..
// -Master PHP Code:
PHP Code:
I dunno if I am doing anything wrong.. (Doesn't output the echo in rc chat) |
I've never triggered accross weapons. I've always just triggered the current one and use a public function ^^.
|
Well, is it possible to do this?
Actually the 'this.wnpc' is from variable saved on the player, that was just an example. Just wondering if it is possible, would make my work easier :O (I am planning on having one master script to control other wnpcs (each wnpc with a different ability/functons etc.), so making lots of public functions inside the master script would just look messy) The stuff I am doing would look more like,.. : PHP Code:
|
I did something similar a while ago.
I have a weapon script which creates an NPC using putnpc2. When that NPC is touched it triggers an action on the weapon NPC. In the placed npc I just have triggeraction(0,0,"serverside","npc name",params); I'm pretty sure that works, if not, you can always use findweapon. Master NPC Code: Chompy/Test NPC Code: |
its not, it must use a variable instead of the real wnpc name, thats my problem..
like triggerserver( "gui", "Chompy/Test", ...); works fine, but if I take out 'Chompy/Test' and replace with a variable it won't work.. I don't know what type it needs, if its an object or a string.. |
Quote:
|
Quote:
What I am saying is that, my problem is something like this: This works PHP Code:
PHP Code:
|
PHP Code:
|
Quote:
|
Quote:
|
Quote:
|
Triggering script:
HTML Code:
//#CLIENTSIDEHTML Code:
function onActionServerside(curOption)This also works too: HTML Code:
//#CLIENTSIDE |
Quote:
( 'weapon' instead of 'gui', will check if it works on my server) |
"weapon" and "gui" are the same though. For me the only possible solution is that the player actually doesn't have both weapons.
|
Quote:
|
It works fine for me, Even with the variable calling o.O
Hikaru/Test PHP Code:
PHP Code:
|
hmm, weird..
|
| All times are GMT +2. The time now is 06:23 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.