Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Server (https://forums.graalonline.com/forums/forumdisplay.php?f=14)
-   -   PutNpc2 (https://forums.graalonline.com/forums/showthread.php?t=34677)

BinaryCrash 07-30-2002 08:24 PM

PutNpc2
 
dunno if it was asked before, but, how to pass
variables from a script to a script using putnpc2?

example if i have a script like this:

v1=2;
putnpc2 blahblah {
message #v(v1);
}

the variable 'v1' don't pass to the new npc...
how to do it?

amonrabr 07-30-2002 09:18 PM

Try something like this;

putnpc2 ex,ey,{ message #v(this.v1); };
with (npcs[npcscount-1]) { this.v1=2; }

BinaryCrash 07-31-2002 02:15 PM

nice idea ;)

KuJi2002 08-01-2002 02:33 AM

???
 
putnpc2?
is that p2p scripting me never heard of that lol

user13-xo 08-01-2002 07:55 AM

Re: ???
 
Quote:

Originally posted by KuJi2002
putnpc2?
is that p2p scripting me never heard of that lol

It isnt p2p script, its npc server scripting.

mikepg 08-01-2002 12:56 PM

Quote:

Originally posted by amonrabr
Try something like this;

putnpc2 ex,ey,{ message #v(this.v1); };
with (npcs[npcscount-1]) { this.v1=2; }

uhh....what would the point of that be?
if you're just gonna set a variable to a value, then why not do it in the putnpc2 brackets?

so far, I know that params (triggeraction params, etc) are passable, but this.vars are not. This.strings are also not passable (as far as I'm aware of)

But...eitherway, isn't there a forum for this thread...like..umm... oh let's say "NPC Server" ?

amonrabr 08-01-2002 08:32 PM

Quote:

Originally posted by mikepg


uhh....what would the point of that be?
if you're just gonna set a variable to a value, then why not do it in the putnpc2 brackets?

Thats the point, you cant do that to pass..
Anyway I didnt pass anything, I setted "2" for this.v1.. to pass you have to do something like this:
this.v1=2;
putnpc2 ex,ey,{ message #v(this.v1); };
thiso.v1=this.v1;
with (npcs[npcscount-1]) { this.v1=thiso.v1; }

screen_name 08-01-2002 09:14 PM

Re: ???
 
Quote:

Originally posted by KuJi2002
putnpc2?
is that p2p scripting me never heard of that lol

there is no p2p scripting anymore

its called serverside scripting now :)

adam 08-02-2002 04:48 AM

*reads up on serverside*
I need practice... and I will get it if the rumor is true.

BinaryCrash 08-02-2002 08:15 AM

Quote:

Originally posted by mikepg


uhh....what would the point of that be?
if you're just gonna set a variable to a value, then why not do it in the putnpc2 brackets?

so far, I know that params (triggeraction params, etc) are passable, but this.vars are not. This.strings are also not passable (as far as I'm aware of)

But...eitherway, isn't there a forum for this thread...like..umm... oh let's say "NPC Server" ?


Imagine that you want to change variables on npcs that was
put using putnpc2... but need to use this.vars
without trigger actions...


All times are GMT +2. The time now is 06:12 AM.

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