Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-03-2001, 06:12 AM
Pago Pago is offline
Registered User
Pago's Avatar
Join Date: Mar 2001
Location: Virginia, USA
Posts: 299
Pago is on a distinguished road
Send a message via AIM to Pago
Question

Over my school's Spring Break I'm going to make a "sports bar" that features tag-team type sparring rooms. But before I program the rooms, I'd like to know:

1) How do I assign an index to a specific player?

2) How do I assign an index to a specific group of players?

3) Once I assign the index, how would I be able to change the player/group of players that the index refers to?

I'd appreciate it if you answer any or all of these questions. Thanx!
__________________
Reply With Quote
  #2  
Old 04-03-2001, 06:38 PM
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
Well basically you can use indexes in the following way:
NPC Code:

if (playerenters||timeout) {
for (this.i=0;this.i<playescount;this.i++) {
/*Here you can always check for a player with for
example a specific flag if he is in a certain position by
for example using if (players[this.i].x==x)*/
}
timeout = 0.05;
}

__________________

Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 06:48 AM.


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