HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Level Spawn

11-09-2002, 09:51 PM#1
-={tWiStÄr}=-
Im trying to make monsters spawn by setting Monster[1] to Spider lvl. 1 and then i say set i = i +1 and i starts out as 0, then i tell it to create 25 Monster[i] and it cant. i did some testing and when i tell it too just create 25 spiders it works. ive made maps with other editors from blizzard but this is my first for War3. Everthing is perfect besides that so far.
11-09-2002, 10:16 PM#2
ph33rb0
You know, I looked at the triggers for Ark's Tower D once and these look kinda similar.
11-10-2002, 01:33 AM#3
Jeltz
It should work.
11-10-2002, 01:56 AM#4
Guest
what happens when i starts out at 1?
11-10-2002, 04:33 AM#5
Draco
Is your variable a unit array or a unit-type array? (Use the latter one)

:gsmile:
11-10-2002, 07:42 PM#6
-={tWiStÄr}=-
I havent tried starting i at 1 but i think that would mess it up because if i was 1 then i couldnt add 1 too it or it would start at level 2. ill try starting i at 1 but do i just get rid of +1 to i? and it is a unit-type array. I cant find anything wrong with it
11-10-2002, 07:59 PM#7
Guest
just put it at one to see what happens. u can always change it back to zero, but u just have to find out what is wrong.
11-10-2002, 08:15 PM#8
-={tWiStÄr}=-
putting it at 1 didnt change anything. for some reason it seems like it cant read i. if i put in monsters[i] nothing happens. if i put in monsters[1] the guys are made no matter what i equals. i is supposed to be an integer... right?
11-10-2002, 10:08 PM#9
Insaniteus
Make a trigger as follows:

Event - player skips a cinematics (aka, you hit esc)
Actions - Game - display text message String(Interger(i))

Whenever you hit Esc, it will tell you what I is. If i is some crazyassed number or just zero, then you have a probelm with how you add to i.

-Insaniteus-
11-11-2002, 02:10 AM#10
Draco
'i' is supposed to be an integer, but I think that 'monster' must be a unit-type and not a unit variable. I could be wrong but I'm too lazy to test it.
11-11-2002, 05:11 AM#11
MrDoomMaster
First, create a trigger that sets the variables that will contain the spawn level's information:

Trigger # 1:

Events:
-Map Initialization

Conditions:
-(None)

Actions:
-------Level 1--------
-Set i = i + 1
-Set SPAWNamount[i] = 30
-Set SPAWNname[i] = Spiders
-Set SPAWNtype[i] = Spider
-Set SPAWNreward[i] = 2




That would be the basic initialization for Level 1. To initialize the spawning of this level, here is what i would do:

Trigger # 2:

Events:
-Timer Expires

Conditions:
-(None)

Actions:
-Set z = z +1
-Create SPAWNamount[z] SPAWNtype[z] at center of {region} facing default building facing degrees



Integer Z would incremented every time your timer expires to keep up with what level your at, and to spawn different areas of your Unit Type arrays. Since this is the first level, Z would be 1... meaning level 1. The second time your timer expIs this thorough enough?
11-17-2002, 04:21 PM#12
-={tWiStÄr}=-
Doom master, Ill try what you said but I still dont see what is wrong with my trigger, its like it cant read the variable.