Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Question involving triggeractions (https://forums.graalonline.com/forums/showthread.php?t=51756)

Gman4pwnu 03-17-2004 02:36 AM

Question involving triggeractions
 
Just wondering, how can I go to serverside script in button b to open door a which is a class clientside? I tried sending actiongrab which is what it normally opens on to its x+.5,y+.5. It wouldn't work. Any help?

-Ramirez- 03-17-2004 04:55 AM

Triggeraction can't be used to send things clientside between NPCs. Well, I don't know about two different NPCs, but trying to trigger the same NPC's clientside part doesn't work. (NPC weapons are an exception to this though... they can use triggeraction 0,0,clientside,weaponname the same way you do triggeraction 0,0,serverside,weaponname.)

A solution would be to set a save[] var or client.string to whatever you need. You can have a timeout checking that clientside to see if it has changed. If it has, do whatever you want to do.. obviously. :P If you use a client.string, be sure to unset it so the player doesn't get an extra flag left on their account. *waits for hacker-paranoid people to come and gripe at him about suggesting client.*

Loriel 03-17-2004 12:31 PM

I think he wants to go from clientside to serverside?

Did you do setshape on the serverside?

-Ramirez- 03-17-2004 05:36 PM

Quote:

Originally posted by Loriel
I think he wants to go from clientside to serverside?
Haha, now that I reread it, I'm not sure either. "Go to serverside" "to open door a which is class clientside"

GoZelda 03-17-2004 05:59 PM

Erm it's easy

NPC Code:

//#CLIENTSIDE
if (keybispressed){
triggeraction 0,0,serverside,open_door;
}



NPC Code:

if (actionserverside){
if (strequals(#p(0),open_door)){
open_door();
}
}
//#CLIENTSIDE
function open_door(){
OPENTEH FIRGGEN DOOR K?
}


Loriel 03-17-2004 06:31 PM

It is not that easy.


All times are GMT +2. The time now is 10:58 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.