![]() |
triggeraction x y and putnpc2 x y
I am trying to get a clientside triggeraction to place an npc serverside:
My question is, how do I access the x and y, sent from the triggeraction, on the server, in the putnpc2 command? Here is the clientside part NPC Code: Any help would be appreciated. |
Ok, first of all it's not #//CLIENTSIDE, it's //#CLIENTSIDE.
Second of all you need to trigger the weapon itself to run a script in it serverside. Example: NPC Code: To access any params sent from a triggeraction, use #p(0-#) They are strings, so you convert them to integers for use in X and Y placements, use strtofloat(#p(#0)); Then again I haven't scripted in awhile but I think that's everything you need to know. [Edit]Edited because I think I was under the influence of fatigue while typing. |
Quote:
|
Still does not put the npc on my server,
I tried putting in other ways to tell if the npc was created NPC Code: Why does this still not work? |
IF i understand this right, that is all in the same NPC.
Since you have: NPC Code:triggeraction playerx+1.5+vecx(playerdir)*2,playery+2+vecy(playe rdir)*2,pl ant,Planting,; the (actionplant) stuff needs to be in another NPC. |
(missing the days of graal 1.28 when I understood npcs)
Why does it need to be in another npc? Does anyone have a working example to share that uses triggeractoin to perform a putnpc2 ccommand? |
I can do something with triggeraction and a putnpc2
NPC Code: There I didn't check over it so there may be spelling errors but that should do the trick. |
THanks, I got it to work!
Interesting that the first two paramaters have to be 0. |
Yeh well when u trigger something serverside u do 0,0 so it hits the npc server
|
Quote:
Quote:
|
Quote:
|
If you read newfeatures, there is a way to use triggeraction from server-side to client-side on weapons, if you did not know, here is what is written and may help you.
Quote:
|
I believe its automatically set , esp sence GScript is a 3rd party scripting engine
~Sern |
Yeah well i knew my statement wasnt the actual reason it just made me feel better since it basically made sense
|
Quote:
|
Quote:
In the new scripting engine, this is much simpler. :) |
Quote:
|
Easiest way to do it with putnpc2 is just join it with a class npc
|
Quote:
|
Quote:
|
yeah gscript is based on a different scripting language and has builtin commands that basically makes it 3rd party
|
Wrong expression/words for that context.
|
hows that?
|
Third party means that it was developed outside of the team/company that made the original product.
Such as Graal User Statistics (Graal.us) is third party software for GraalOnline. |
Oh I'm probably thinking of some other word that has the definition that i said but het cant blame me for my stupidity!
|
Quote:
|
| All times are GMT +2. The time now is 07:11 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.