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 02-27-2002, 04:42 AM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
playerleaves

NPC Code:

NPC Code:

if (playerleaves) {
setstring server.string,#v(ringstatus);
}




That works so if all the players leave the level it sets the variable to a server string right ?

Its for a free server ...
Reply With Quote
  #2  
Old 02-27-2002, 06:44 AM
Goboom Goboom is offline
Pixel Monkey
Goboom's Avatar
Join Date: Dec 2001
Location: Michigan
Posts: 1,702
Goboom is on a distinguished road
Send a message via ICQ to Goboom Send a message via AIM to Goboom Send a message via MSN to Goboom Send a message via Yahoo to Goboom
is playerleaves a commmand...??? ....If not if its for a specific level... you could use this i think
NPC Code:

if (!strequals(#L,<levelname>)){
setstring server.string,#v(ringstatus);
}

__________________
Reply With Quote
  #3  
Old 02-27-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
Re: playerleaves

Quote:
Originally posted by nyghtGT
NPC Code:

NPC Code:

if (playerleaves) {
setstring server.string,#v(ringstatus);
}




That works so if all the players leave the level it sets the variable to a server string right ?

Its for a free server ...
playerleaves is a P2P event, use

if (playerenters && !strequals(#L,blah.graal))
Reply With Quote
  #4  
Old 02-27-2002, 06:56 AM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
no its not for if the player leaves the level its not a player based NPC... Its all level based, I think it means if all players leave the level then the action occurs, cause whenever i tried it online and i left with other people in it nothing happened ....
Reply With Quote
  #5  
Old 02-27-2002, 07:20 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
yes, it is for if the player leaves the level

nothing happened online because playerleaves doesn't work for Non-P2P

and NPCs don't even run while there are no players in the level for non-p2p (the npcs are run by the "leader", with no players, no leader)

although on P2P you could do "playerscount=0" or something
Reply With Quote
  #6  
Old 02-27-2002, 07:26 AM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
Quote:
Originally posted by Faheria_GP2
yes, it is for if the player leaves the level

nothing happened online because playerleaves doesn't work for Non-P2P

and NPCs don't even run while there are no players in the level for non-p2p (the npcs are run by the "leader", with no players, no leader)

although on P2P you could do "playerscount=0" or something
ok what i am saying is i want it to be used as if there is a painting in the level that people can doodle on, and say everyone leave the level, well all the vlaues would be reet and the painting lost, what i want it to be able to do is for when the last player leaves it sets the values to a serevr.string and then the normal vars are reset ...
Reply With Quote
  #7  
Old 02-27-2002, 07:28 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
well, the only thing you could do for non-P2P is when the first player enters the level do those things

"if (playerenters && isleader)"
Reply With Quote
  #8  
Old 02-27-2002, 07:59 AM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
Quote:
Originally posted by Faheria_GP2
well, the only thing you could do for non-P2P is when the first player enters the level do those things

"if (playerenters && isleader)"
you just do not understand ....

If players A,B,C,D,E, and F are all in level.nw, and then they all leave. I want it to 'setstring server.string,#v(this.variable);' I want to know if 'playerleaves' will make it so it will set the string when they all leave ...
Reply With Quote
  #9  
Old 02-27-2002, 09:22 AM
TDK_RC6 TDK_RC6 is offline
Registered User
TDK_RC6's Avatar
Join Date: Jan 2002
Location: Earth
Posts: 0
TDK_RC6 is on a distinguished road
playerleaves is p2p only

here is a script that will work

NPC Code:

if (playerenters||timeout)
setstring server.string,#v(playerscount);
timeout=.05;
}

__________________
Staff on Renegade


email: [email protected]
aim: papivicente
Reply With Quote
  #10  
Old 02-27-2002, 10:15 AM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
"Royce": Nyght you could have atleast of asked me. Player leaves in a p2p command. The only way to save the picture before the players leave is to run a constant timeout. Screen name, shouldnt you have a timeeverywhere command in there also?
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 04:43 PM.


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