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 08-23-2011, 12:08 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by Televangelist View Post
Ooh, nice!


So, just so I'm clear:

1. players.size refers to the number of players in the level, not the overall server?

2. The larger plan I have for the 'adventuring time limit' that can be expanded via power-ups (in the same way your heart meter, say, can be expanded in a Zelda game over time) is feasible as well?

Thanks!
There's players and allplayers. The first always refers to the players in the level the code is executed in. The latter refers to all players on the server. Also, your "larger plan" should be possible as well. I suggest you store the time it can be extended in some clientr.variables (like Tricxta said), then just wait the specific time when all players left until you reset your stuff.
Reply With Quote
  #2  
Old 08-23-2011, 09:50 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Crow View Post
There's players and allplayers. The first always refers to the players in the level the code is executed in. The latter refers to all players on the server.
To clarify, allplayers is an array of player objects (TServerPlayer) for every player online.

players is an array of every player in the current level (on GMAPs, every player within roughly a one-level radius).

When you're doing players.size(), it's just returning the number of items in the array.
__________________
Reply With Quote
  #3  
Old 08-23-2011, 11:54 PM
Televangelist Televangelist is offline
Registered User
Join Date: Aug 2011
Posts: 21
Televangelist is on a distinguished road
Very helpful, thanks!
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 02:55 AM.


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