![]() |
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; }; } |
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 |
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...:(
|
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.
|
!
I think you have to put //#CLIENTSIDE before every script to make it work...?!
I dunno i aint no good scripters like you guys! |
*wishes he knew P2P scripting*
|
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..
|
no put //#CLIENTSIDE in the part thats clientside and //#SERVERSIDE on the other part that should work i dont remember
|
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.
|
Re: if (action)...clientside???
Quote:
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). |
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.
|
You can do the leap and message stuff clientside, and have the variable serverside. You need setshape/showcharacter then.
|
ok thank you XD i forgive you for *accidently* disconnecting me last month =p lol
:D :D :D |
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. |
I don't think serverside putleaps are shown for the client. Actually I am quite sure they are not.
|
Ick, putleaps...evil, didn't notice that...thought it was a move code.
|
the only thing showcharacter is doing is turning the bush into an npcperson 0.o
|
Quote:
|
| All times are GMT +2. The time now is 07:34 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.