Graal Forums

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

ownerofbabylon 08-24-2001 03:45 AM

Hmm?
 
I am trying to get better at scripting and I am asking someone to tell me in detail how this is used and what for?

if (playertouchsme) {
for (this.i=0;this.i<npcscount;this.i++) {
callnpc this.i,open1;
}
}


Like i dont understand all that i=0 and this.1++ and I dont know how to use callnpc

LiquidIce00 08-24-2001 07:56 AM

for is a loop
its like while but its special for numbers
that loop is saying

this.i start out at 0
keep going until you are NOT less then npcscount
add 1 to this.i everytime u loop.

and callnpc is a command used to call an if statement true
if you have a whole bunch of npc's in a level and then u do that loop
and
then in a door u put if (open1) { hide; }
the callnpc will call that . it actually calls to every npc on the level cuz of ur loop ...

Shard_IceFire 08-24-2001 08:28 AM

:confused:

ownerofbabylon 08-24-2001 08:35 AM

:confused: I understand about half of that. So that would make every door on the level disappear?


All times are GMT +2. The time now is 02:59 AM.

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