HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

I would like to know what this action means excatly...

09-25-2004, 12:27 PM#1
Arkidas
What excatly does action like this do?

For each (Integer B) from 1 to 22, do (Actions)
Loop - Actions
09-25-2004, 12:35 PM#2
Vexorian
Quote:
Originally Posted by Arkidas
What excatly does action like this do?

For each (Integer B) from 1 to 22, do (Actions)
Loop - Actions
will repeat whatever is in the actions for the numbers from 1 to 22 , and you can use Integer B inside to do something. (keep in mind though that integer B / A are global variables
09-25-2004, 01:08 PM#3
logik
its pretty usefull.

you can use it to detect players easily

eg

for each integer A 1 to 12

if - player (integer A) equal user and player (integer A) equal to playing
then- create 1 hero for player (integer A) at hero<gen>
else- do nothing



also if you want to spawn large amounts of things, ie 25 items in a random location

for each integer A 1 to 25
- create 1 mask of death in (random point of playable map area)



it will repeat the action of creating a mask of death 25 times... im not sure if its efficient, but i dont care - its a use.
09-25-2004, 01:35 PM#4
Arkidas
but what if I want to create a random item?
09-25-2004, 02:02 PM#5
logik
thats easy...

if u want a random item from a type...

to

item - create (random item from charged)

or u can use variables etc
09-25-2004, 02:09 PM#6
Dead-Inside
Quote:
Originally Posted by logik
thats easy...

if u want a random item from a type...

to

item - create (random item from charged)

or u can use variables etc

Exactly. If you want specific items (Let's say you want a random one out of Ankh, Mask of Death and Wand of Illusion) then you'd go about;

"Item - Create (ItemArray[(Random number(1,3))]) for Player(Player Number(Integer B)) at LocationHere"