Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   A quick question (https://forums.graalonline.com/forums/showthread.php?t=889)

Pago 04-03-2001 06:12 AM

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!

grim_squeaker_x 04-03-2001 06:38 PM

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;
}



All times are GMT +2. The time now is 04:47 PM.

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