![]() |
for(...) and i
can someone explain the following code to me please ... i dont understand it .... Explain all parts and what they do please ...
NPC Code: |
Re: for(...) and i
Quote:
and inside the other npcs you can say if(swimming){ //coding } so humm lets say the npc calling that code is a person npc and it gets shot then the person npc would call all the npcs and set swimming then in the other npcs that you want it to effect you say if(swimming){ } and do whatever you want in that coding once the person npc gets shot |
Re: for(...) and i
NPC Code: So what it would be doing in "normal" talk: 1) Wait until the NPC is hit by an arrow. 2) Set "i" to 0 3) Tell the NPC with index "i" that "swimming" is called (makes if (swimming) happen) 4) Increase "i" by one 5) Go back to 3 if "i" is lower than the amount of NPCs in the level 6) Stop executing |
Re: Re: for(...) and i
Quote:
|
Re: Re: Re: for(...) and i
Quote:
:spam: :spam: :spam: :spam: :spam: :spam: :spam: :spam: |
| All times are GMT +2. The time now is 07:12 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.