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 07-30-2002, 08:24 PM
BinaryCrash BinaryCrash is offline
No memory dump.
Join Date: Jul 2002
Location: Brazil
Posts: 70
BinaryCrash is on a distinguished road
Send a message via ICQ to BinaryCrash Send a message via MSN to BinaryCrash
Question 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?
  #2  
Old 07-30-2002, 09:18 PM
amonrabr amonrabr is offline
Scripter
Join Date: Nov 2001
Location: Brazil
Posts: 374
amonrabr is on a distinguished road
Try something like this;

putnpc2 ex,ey,{ message #v(this.v1); };
with (npcs[npcscount-1]) { this.v1=2; }
  #3  
Old 07-31-2002, 02:15 PM
BinaryCrash BinaryCrash is offline
No memory dump.
Join Date: Jul 2002
Location: Brazil
Posts: 70
BinaryCrash is on a distinguished road
Send a message via ICQ to BinaryCrash Send a message via MSN to BinaryCrash
nice idea
  #4  
Old 08-01-2002, 02:33 AM
KuJi2002 KuJi2002 is offline
Banned
Join Date: Jul 2002
Location: NYC
Posts: 144
KuJi2002 is on a distinguished road
Send a message via AIM to KuJi2002 Send a message via Yahoo to KuJi2002
???

putnpc2?
is that p2p scripting me never heard of that lol
  #5  
Old 08-01-2002, 07:55 AM
user13-xo user13-xo is offline
Registered User
Join Date: Nov 2001
Location: California
Posts: 297
user13-xo is on a distinguished road
Send a message via AIM to user13-xo
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.
  #6  
Old 08-01-2002, 12:56 PM
mikepg mikepg is offline
Registered User
Join Date: Nov 2001
Location: VA, USA
Posts: 501
mikepg is on a distinguished road
Send a message via AIM to mikepg Send a message via Yahoo to mikepg
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" ?
__________________
~War Lord Mpg2
Bravo Online's Asst. Staff Manager

"Sittin by the tree, sippin eggnog, waitin on christmas gifts"
  #7  
Old 08-01-2002, 08:32 PM
amonrabr amonrabr is offline
Scripter
Join Date: Nov 2001
Location: Brazil
Posts: 374
amonrabr is on a distinguished road
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; }
  #8  
Old 08-01-2002, 09:14 PM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
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
__________________
[signature]insert here[/signature]
  #9  
Old 08-02-2002, 04:48 AM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura about
Send a message via AIM to adam
*reads up on serverside*
I need practice... and I will get it if the rumor is true.
__________________
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- irc.freenode.net Channel: #graaldt
Quote:
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly
  #10  
Old 08-02-2002, 08:15 AM
BinaryCrash BinaryCrash is offline
No memory dump.
Join Date: Jul 2002
Location: Brazil
Posts: 70
BinaryCrash is on a distinguished road
Send a message via ICQ to BinaryCrash Send a message via MSN to BinaryCrash
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...
 


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 11:42 AM.


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