Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-16-2002, 06:41 AM
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
putnpc/putnpc2

I know how to use these, but what player do the playerattributes pertain to? like, playerx, playermp, playerhearts, ect.

does it go to the player that is the 1st in the level, or the player that had the script that placed it?
__________________
~War Lord Mpg2
Bravo Online's Asst. Staff Manager

"Sittin by the tree, sippin eggnog, waitin on christmas gifts"
Reply With Quote
  #2  
Old 01-16-2002, 06:58 AM
LiquidIce00 LiquidIce00 is offline
RadioActive Monkeeh
LiquidIce00's Avatar
Join Date: Apr 2001
Location: dirty south
Posts: 2,112
LiquidIce00 is on a distinguished road
Send a message via ICQ to LiquidIce00 Send a message via AIM to LiquidIce00 Send a message via Yahoo to LiquidIce00
depends if its clientsided/server sided
putnpc2 is only p2p
putnpc is both ..
and free scripts are always client sided
__________________
LiquidIce *Owner* (UnholyNation)
-UN Website
http://www.unholynation.com
-UN Forum
http://forums.unholynation.com
-
-the thinker
-

-
onwall2 for nonp2p (i suck at onwall)
Reply With Quote
  #3  
Old 01-16-2002, 07:17 AM
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
hmm

okay, so, if it's clientside, it affects the player that placed it, if it's server side, it affects the 1st player in the level?

What about join? If you call an NPC using putnpc2, and use join, while in client side, will that not function, or will it work fine and effect the caller of the npc.

ex:
//#CLIENTSIDE
if (this.blah = 0) {
putnpc2 {join scriptname.txt};
}

or does join ONLY work if it's in a server side section?
__________________
~War Lord Mpg2
Bravo Online's Asst. Staff Manager

"Sittin by the tree, sippin eggnog, waitin on christmas gifts"
Reply With Quote
  #4  
Old 01-17-2002, 12:16 AM
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
Re: hmm

Quote:
Originally posted by mikepg
okay, so, if it's clientside, it affects the player that placed it, if it's server side, it affects the 1st player in the level?

What about join? If you call an NPC using putnpc2, and use join, while in client side, will that not function, or will it work fine and effect the caller of the npc.

ex:
//#CLIENTSIDE
if (this.blah = 0) {
putnpc2 {join scriptname.txt};
}

or does join ONLY work if it's in a server side section?
putnpc2 only works on the serverside. But you can do stuff like:
NPC Code:
if (actionserverside) {
putnpc2 playerx,playery,{join whatever;};
with (npcs[npcscount-1]) {
this.playerx=playerx;
this.playery=playery;
}
}
//#CLIENTSIDE
if (weaponfired) triggeraction x,y,serverside,WeaponName,;

The setting of the variables is performed before the created of the NPC put wih putnpc2.
__________________

Reply With Quote
  #5  
Old 01-17-2002, 06:47 AM
Faheria_GP2 Faheria_GP2 is offline
Banned
Faheria_GP2's Avatar
Join Date: Oct 2001
Posts: 1,177
Faheria_GP2 is on a distinguished road
when

"playerx" and such is in an event, the default index is the player that triggered the event.

if it is in a timeout event, I think playerx would be the 1st player in the level, but I am not sure if this is the case.

for example

if (playertouchsme) playermp=100; //Player that touched
if (washit) playermp=100; //Player that hit
if (playerchats) {
putnpc2 blah blah blah {
if (created) playermp=100 //Player that caused the creation by chatting
}
}
Reply With Quote
  #6  
Old 01-17-2002, 12:18 PM
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
Ok. Clientside NPC's are activated and ran from the client's computer. Basically, the client recieves a "copy" of the NPC. In serverside, the NPC's are on the server; each client does not receive a copy. So, that way, all clients can access the NPC and use it "together".
__________________
-Boco

FLKJH$TRFG*$(&%>FMG >REN<>F ;.kjsd
Reply With Quote
  #7  
Old 01-19-2002, 07:23 AM
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
ok

thanx. Even though its a little more complicated idea than you guys think, these basic ideas helped a lot .

__________________
~War Lord Mpg2
Bravo Online's Asst. Staff Manager

"Sittin by the tree, sippin eggnog, waitin on christmas gifts"
Reply With Quote
Reply


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 09:56 AM.


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