HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Need Help!

09-02-2003, 03:31 PM#1
D40-88
Hi all.
I need help on creating a new AI for the burning legion for my custom map. I want the demon gates to train burning legion units every certain amount of time. After a certain group of units are trained, send them to attack the player.
Also, how do I make the AI revive a fallen hero once it's killed. After a certain time, the hero also attacks the player.
Mostly, I want the attacks to be organized into waves.
If anyone needs me to clarify my question, please feel free to ask.
I really appreciate any assistance.
Thank you.
:)

Here's what I have so far:

1st trigger
(event)
*elapse time is 300 sec
(action)
*set timer1=true (timer1 is a boolean value)

2nd trigger
(event)
*every 400 sec
(condition)
*timer1=true
(action)
*order demon gate to train felguard
*order last created unit to move to area1 (area1 is region)
*order demon gate to train felbeast
*order last created unit to move to area1
*wave1=true (wave1 is boolean value)

3rd trigger
(condition)
*wave1=true
(action)
*order units in area1 own by player1 attack player2 start location

When I play the game, the comp trains the units but they stay where they are and not move to 'area1' nor do they ever attack.
09-02-2003, 07:02 PM#2
Ligature
Quote:
Originally posted by D40-88

2nd trigger
(event)
*every 400 sec
(condition)
*timer1=true
(action)
*order demon gate to train felguard
*order last created unit to move to area1 (area1 is region)
*order demon gate to train felbeast
*order last created unit to move to area1
*wave1=true (wave1 is boolean value)

[/b]

I don't know if a demon gate can train felguards...

But anyway, "Last Created Unit" refers only to units that are just created by the "Create Unit" action... You'll need a trigger that uses event "A Unit Finishes Training a Unit" and orders the "Trained Unit" to area 1.

As for reviving the hero, I would use a trigger that uses event "(whatever hero) Dies" unless he's being created in code, in which case you could use a "Unit owned by player (whatever)" event and check if it was of the same unit type as the hero. Then just have it wait however long you feel is appropriate, knock down the gold for that player, wait again, and revive the hero wherever you want him.

Does this make any sense, or am I missing the point?
09-02-2003, 07:39 PM#3
D40-88
For my hero revival, here's what I did:

1st trigger
(event)
*unit dreadlord 0044<gen> dies
(action)
*unit-order altar of darkness 0011<gen> revive hero dreadlord 0044<gen>
*set dreadlord=true (dreadlord is a boolean value)

2nd trigger
(event)
unit-altar of darkness 0011<gen> finishes reviving
(condition)
dreadlord=true
(action)
unit-order dreadlord 0044<gen> to move to center of area1 (area1 is a region)
set dreadlordmove=true (boolean value)

3rd trigger
(event)
every x seconds of game time
(condition)
dreadlordmove=true
(action)
*order units in area1 own by player1 attack player2 start location

Is this how to make the hero revive and attack?
Appreciate any help, thank you.