Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-17-2004, 02:36 AM
Gman4pwnu Gman4pwnu is offline
Banned
Join Date: Jan 2004
Posts: 434
Gman4pwnu is on a distinguished road
Send a message via AIM to Gman4pwnu
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?

Last edited by Gman4pwnu; 03-17-2004 at 02:57 AM..
Reply With Quote
  #2  
Old 03-17-2004, 04:55 AM
-Ramirez- -Ramirez- is offline
Registered User
Join Date: Jun 2002
Location: USA, Ohio
Posts: 729
-Ramirez- has a spectacular aura about-Ramirez- has a spectacular aura about
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.*
__________________
Kat
Reply With Quote
  #3  
Old 03-17-2004, 12:31 PM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
I think he wants to go from clientside to serverside?

Did you do setshape on the serverside?
Reply With Quote
  #4  
Old 03-17-2004, 05:36 PM
-Ramirez- -Ramirez- is offline
Registered User
Join Date: Jun 2002
Location: USA, Ohio
Posts: 729
-Ramirez- has a spectacular aura about-Ramirez- has a spectacular aura about
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"
__________________
Kat
Reply With Quote
  #5  
Old 03-17-2004, 05:59 PM
GoZelda GoZelda is offline
Mister 1,000,000
GoZelda's Avatar
Join Date: Jan 2003
Location: Brussels, capital of Europe.
Posts: 5,396
GoZelda will become famous soon enough
Send a message via AIM to GoZelda Send a message via MSN to GoZelda
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?
}

__________________

Quote:
Originally Posted by Lance
stefan is satan
I am the best.
[URL removed]Music or aural pollution?
Reply With Quote
  #6  
Old 03-17-2004, 06:31 PM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
It is not that easy.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 03:50 AM.


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