Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Indexes online (https://forums.graalonline.com/forums/showthread.php?t=6585)

everandom 07-05-2001 02:40 PM

Indexes online
 
if there are uses of index online, what will be index 0 will be (eg. will it be the first one to come to the room or the one who activates the NPC???)

also for example this NPC:
if (playerenters){
this.random=random(0,100);
if (this.random<=20){
setlevel2 something.graal,x,y;
}}

if the first player enters and doesn't get under 20 and a sceond player enters then he gets under 20, will the first player (leader) warped or the second player or both of them...
thanx...

Brady2 07-05-2001 02:41 PM

0 = current player = one who activates.

Brady2 07-05-2001 02:42 PM

Either of them will be warped if they get the right number..

everandom 07-05-2001 02:47 PM


ok kewl thanx very much....
and if a weapon fired and states playerx and playery does it means the activating player???

eg.

if (weaponfired){
playerx=playerx+2;
playery=playery+2;
}

will everybody get warped or only him
:) thanx

Brady2 07-05-2001 02:49 PM

playerx is the same as players[0].x

It is just more efficient.

everandom 07-05-2001 02:54 PM

ohhh okay kewl..
thanx

Brady2 07-05-2001 11:13 PM

-Posted by Jadis

How is it not different..?


All times are GMT +2. The time now is 03:55 AM.

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