Graal Forums  

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

 
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 10-30-2001, 04:40 AM
Bravo_LAT-Admin Bravo_LAT-Admin is offline
Registered User
Join Date: Jun 2001
Location: banana
Posts: 165
Bravo_LAT-Admin will become famous soon enough
if (action)...clientside???

I have a simple question (might lead to the root of why my script won't work.) is if (action) commands only clientside? cause here is a test i did...and it worked clientside only.

if (actionberry)
{message ouch;}
//#CLIENTSIDE
if (actionberry)
{
if (playerdir==0) { putleaps 0,playerx+0.5,playery-1; };
if (playerdir==1) { putleaps 0,playerx-2,playery+1; };
if (playerdir==2) { putleaps 0,playerx+0.5,playery+2.5; };
if (playerdir==3) { putleaps 0,playerx+3,playery+1; };
}
__________________

  #2  
Old 10-30-2001, 04:55 AM
KJS KJS is offline
The one, The only -
KJS's Avatar
Join Date: Apr 2001
Location: USA, Minnesota
Posts: 1,012
KJS is on a distinguished road
Send a message via AIM to KJS
no its not only clientside but mabie theres a glitch in putting it 2 times in 1 npc

I know that you can't trigger an action and have it reseve it in the same npc
__________________
Thanks,
-KJL
  #3  
Old 10-30-2001, 05:03 AM
Bravo_LAT-Admin Bravo_LAT-Admin is offline
Registered User
Join Date: Jun 2001
Location: banana
Posts: 165
Bravo_LAT-Admin will become famous soon enough
hmm well yes the triggeraction is performed with a seperate weapon npc. thats why the leaps work. Even after i take them out it still won't perform the serverside triggeraction...
__________________

  #4  
Old 10-30-2001, 07:15 PM
grim_squeaker_x grim_squeaker_x is offline
Retired Oldbie
grim_squeaker_x's Avatar
Join Date: Mar 2001
Posts: 3,084
grim_squeaker_x will become famous soon enough
Very strange, for as far as I know triggeraction should work both client and serverside, of course perhaps it doesn't work when you try to trigger something both client and serverside.
__________________

  #5  
Old 10-31-2001, 12:44 AM
wark2 wark2 is offline
Registered User
Join Date: Oct 2001
Location: Canada
Posts: 306
wark2 is on a distinguished road
Send a message via AIM to wark2 Send a message via Yahoo to wark2
!

I think you have to put //#CLIENTSIDE before every script to make it work...?!
I dunno i aint no good scripters like you guys!
  #6  
Old 10-31-2001, 02:10 AM
AlexH AlexH is offline
Have A Drink On Me
AlexH's Avatar
Join Date: Jun 2001
Location: Somewhere In Time
Posts: 7,442
AlexH is on a distinguished road
Send a message via AIM to AlexH Send a message via MSN to AlexH
*wishes he knew P2P scripting*
__________________
QUICK LOOK BUSY JESUS IS COMING!
  #7  
Old 10-31-2001, 03:57 AM
Bravo_LAT-Admin Bravo_LAT-Admin is offline
Registered User
Join Date: Jun 2001
Location: banana
Posts: 165
Bravo_LAT-Admin will become famous soon enough
well wark putting clientside in the front will make the whole thing clientside therefore only the person doing the triggeraction will be able to see the image change and the variable will only change for them.. and grim i did try it by itself both ways...only the clientside worked...maybe it is a glitch in that case stefan needs to restart our npcserver..
__________________

  #8  
Old 10-31-2001, 06:55 AM
TDK_RC2 TDK_RC2 is offline
Registered User
Join Date: Oct 2001
Posts: 79
TDK_RC2 is on a distinguished road
Send a message via ICQ to TDK_RC2 Send a message via AIM to TDK_RC2
no put //#CLIENTSIDE in the part thats clientside and //#SERVERSIDE on the other part that should work i dont remember
__________________
This is Jman9912! i will have some images up and stuff for this profile cuz my account is not working. For some reason ti was banned for Credit Card problem, and i even already payed for it.
  #9  
Old 10-31-2001, 07:22 AM
BocoC BocoC is offline
Registered User
BocoC's Avatar
Join Date: Jun 2001
Location: Washington State, USA
Posts: 980
BocoC is on a distinguished road
Send a message via AIM to BocoC Send a message via Yahoo to BocoC
Um. I really don't know how to answer this. Triggeraction seems to differ in the way it triggers for me. I dunno. I guess it should work. I once thought that only clientside triggeractions could modify clientside scripts, and serverside triggeractions only serverside scripts, but no, that isn't it. I dunno. I think Stefan should UPDATE commands.rtf and INCLUDE which commands are clientside, and which are serverside. Oh, and //#SERVERSIDE does not exist.
__________________
-Boco

FLKJH$TRFG*$(&%>FMG >REN<>F ;.kjsd
  #10  
Old 11-03-2001, 03:51 AM
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
Re: if (action)...clientside???

Quote:
Originally posted by Bravo_LAT-Admin
I have a simple question (might lead to the root of why my script won't work.) is if (action) commands only clientside? cause here is a test i did...and it worked clientside only.

if (actionberry)
{message ouch;}
//#CLIENTSIDE
if (actionberry)
{
if (playerdir==0) { putleaps 0,playerx+0.5,playery-1; };
if (playerdir==1) { putleaps 0,playerx-2,playery+1; };
if (playerdir==2) { putleaps 0,playerx+0.5,playery+2.5; };
if (playerdir==3) { putleaps 0,playerx+3,playery+1; };
}
Triggeraction works in every direction... clientside -> clientside, clientside -> serverside, serverside -> serverside and serverside -> clientside!
To fix your script, you need to use setshape or showcharacter to make the NPC server know the size of the NPC, so it can check if the trigger hit your NPC.
But an easier way would definately be making it all clientside: The triggering is sent to every player anyways, so it shows only locally, but locally for all players (only the NPC Server would not see the message then, but I doubt he cares).
  #11  
Old 11-03-2001, 09:55 AM
Bravo_LAT-Admin Bravo_LAT-Admin is offline
Registered User
Join Date: Jun 2001
Location: banana
Posts: 165
Bravo_LAT-Admin will become famous soon enough
hmm

but each bush requires a this.variable to tell how many berrys are left of the bush if i make it all clientside there will be a different number for everybody.
__________________

  #12  
Old 11-03-2001, 06:48 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
You can do the leap and message stuff clientside, and have the variable serverside. You need setshape/showcharacter then.
  #13  
Old 11-04-2001, 03:55 AM
Bravo_LAT-Admin Bravo_LAT-Admin is offline
Registered User
Join Date: Jun 2001
Location: banana
Posts: 165
Bravo_LAT-Admin will become famous soon enough
ok thank you XD i forgive you for *accidently* disconnecting me last month =p lol

__________________

  #14  
Old 11-04-2001, 04:17 AM
kyle0654 kyle0654 is offline
-. .`
kyle0654's Avatar
Join Date: Mar 2001
Posts: 1,000
kyle0654 will become famous soon enough
Just do the whole thing serverside.

When you use triggeraction and a serverside npc recieves the action, it will automatically use player variables (playerx,playery,playerdir, all those) from the player that triggered the action.
  #15  
Old 11-04-2001, 04:22 AM
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 don't think serverside putleaps are shown for the client. Actually I am quite sure they are not.
 


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 01:40 PM.


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