- Joined
- May 20, 2008
- Messages
- 138
My "egg hatching script" does not work properly, please help me!
So...
I am making a ZulAman map (WoW raid) for Warcraft 3, and I am having some trouble with the script for one of the bosses.
The boss is called Janalai, and is a Dragonhawk avatar.
Janalai stands on top of a platform, and on the left and right side of this platform, there are two smaller platforms with Dragonhawk eggs.
During the bossfight, 2 "Hatcher" trolls will spawn, run to these small platforms (1 hatcher per platform) and start hatching the eggs there.
However, the trigger for the left platform is not working at all while the trigger for the right platform is working, and the left platform trigger is (should be) a perfect mirror of the trigger for the right platform...
Here is an initialization trigger
But the left platform triggers arent working at all. No eggs are hatched, the hatcher just stands there at the hatchpoint, doing nothing. (read the trigger comments, I hope they explain good enough for you to understand what I WANT to happen)
If you help me solve this or explain why it doesn't work I'll be forever grateful
So...
I am making a ZulAman map (WoW raid) for Warcraft 3, and I am having some trouble with the script for one of the bosses.
The boss is called Janalai, and is a Dragonhawk avatar.
Janalai stands on top of a platform, and on the left and right side of this platform, there are two smaller platforms with Dragonhawk eggs.
During the bossfight, 2 "Hatcher" trolls will spawn, run to these small platforms (1 hatcher per platform) and start hatching the eggs there.
However, the trigger for the left platform is not working at all while the trigger for the right platform is working, and the left platform trigger is (should be) a perfect mirror of the trigger for the right platform...
Here is an initialization trigger
-
Janalai eggs init
-
Events
- Time - Elapsed game time is 1.50 seconds
- Conditions
-
Actions
-
Unit Group - Pick every unit in (Units in Janalai eggs left <gen>) and do (Actions)
-
Loop - Actions
- Unit Group - Add (Picked unit) to JanalaiBoss_eggs_left
-
Loop - Actions
-
Unit Group - Pick every unit in (Units in Janalai eggs right <gen>) and do (Actions)
-
Loop - Actions
- Unit Group - Add (Picked unit) to JanalaiBoss_eggs_right
-
Loop - Actions
-
Unit Group - Pick every unit in (Units in Janalai eggs left <gen>) and do (Actions)
-
Events
-
Janalai boss summon hatchers
-
Events
- Time - JanalaiBoss_HatcherTimer expires
-
Conditions
- JanalaiBoss_incombat Equal to True
-
Actions
- Game - Display to (All players) the text: Where ma hatcha? Ge...
- Countdown Timer - Start JanalaiBoss_HatcherTimer as a One-shot timer that will expire in 30.00 seconds
- -------- Left Hatcher --------
- Unit - Create 1 Amani'shi Hatcher for Player 12 (Brown) at ((Center of Janalai hatcher spawn point <gen>) offset by (0.00, 50.00)) facing Default building facing degrees
- Set JanalaiBoss_HatcherLeft = (Last created unit)
- Unit - Order (Last created unit) to Move To (Center of Janalai hatcher waitpoint Left <gen>)
- -------- Right Hatcher --------
- Unit - Create 1 Amani'shi Hatcher for Player 12 (Brown) at ((Center of Janalai hatcher spawn point <gen>) offset by (0.00, -50.00)) facing Default building facing degrees
- Set JanalaiBoss_HatcherRight = (Last created unit)
- Unit - Order (Last created unit) to Move To (Center of Janalai hatcher waitpoint Right <gen>)
-
Events
-
Janalai boss hatch eggs right
-
Events
- Unit - A unit enters Janalai hatchpoint right <gen>
-
Conditions
-
Or - Any (Conditions) are true
-
Conditions
- (Entering unit) Equal to JanalaiBoss_HatcherLeft
- (Entering unit) Equal to JanalaiBoss_HatcherRight
-
Conditions
-
Or - Any (Conditions) are true
-
Actions
- Unit - Order (Entering unit) to Hold Position
- Wait 1.00 seconds
-
For each (Integer A) from 1 to 8, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (All units of JanalaiBoss_eggs_right are dead) Equal to True
-
Then - Actions
- -------- If the right eggs already are hatched, check if all the eggs on the left platform are dead. If they are not, order the hatcher to run to the left hatching platform, else remove it (the hatcher). --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (All units of JanalaiBoss_eggs_left are dead) Equal to False
-
Then - Actions
- Unit - Order (Triggering unit) to Move To (Center of Janalai hatchpoint left <gen>)
-
Else - Actions
- Unit - Remove (Triggering unit) from the game
-
If - Conditions
-
Else - Actions
- -------- Else (if all the right eggs are dead = false) check if the hatching platform still contains the hatcher (and that it is alive). If those conditions are met, pick units in the "right eggs" unit group and kill a few of them. --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Janalai hatchpoint right <gen> contains (Triggering unit)) Equal to True
- ((Triggering unit) is alive) Equal to True
-
Then - Actions
-
Unit Group - Pick every unit in (Random 2 units from JanalaiBoss_eggs_right) and do (Actions)
-
Loop - Actions
- Unit - Kill (Picked unit)
-
Loop - Actions
-
Unit Group - Pick every unit in (Random 2 units from JanalaiBoss_eggs_right) and do (Actions)
- Else - Actions
-
If - Conditions
-
If - Conditions
- Wait 2.00 seconds
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Events
But the left platform triggers arent working at all. No eggs are hatched, the hatcher just stands there at the hatchpoint, doing nothing. (read the trigger comments, I hope they explain good enough for you to understand what I WANT to happen)
-
Janalai boss hatch eggs left
-
Events
- Unit - A unit enters Janalai hatchpoint left <gen>
-
Conditions
-
Or - Any (Conditions) are true
-
Conditions
- (Entering unit) Equal to JanalaiBoss_HatcherLeft
- (Entering unit) Equal to JanalaiBoss_HatcherRight
-
Conditions
-
Or - Any (Conditions) are true
-
Actions
- -------- Why the eff you see kay doesn't this one work?? --------
- Unit - Order (Entering unit) to Hold Position
- Wait 1.00 seconds
-
For each (Integer A) from 1 to 8, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (All units of JanalaiBoss_eggs_left are dead) Equal to True
-
Then - Actions
- -------- If the left eggs already are hatched, check if all the eggs on the right platform are dead. If they are not, order the hatcher to run to the right hatching platform, else remove it (the hatcher). --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (All units of JanalaiBoss_eggs_right are dead) Equal to False
-
Then - Actions
- Unit - Order (Triggering unit) to Move To (Center of Janalai hatchpoint right <gen>)
-
Else - Actions
- Unit - Remove (Triggering unit) from the game
-
If - Conditions
-
Else - Actions
- -------- Else (if all the left eggs are dead = false) check if the hatching platform still contains the hatcher (and that it is alive). If those conditions are met, pick units in the left eggs unit group and kill a few of them. --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Janalai hatchpoint left <gen> contains (Triggering unit)) Equal to True
- ((Triggering unit) is alive) Equal to True
-
Then - Actions
-
Unit Group - Pick every unit in (Random 2 units from JanalaiBoss_eggs_left) and do (Actions)
-
Loop - Actions
- Unit - Kill (Picked unit)
-
Loop - Actions
-
Unit Group - Pick every unit in (Random 2 units from JanalaiBoss_eggs_left) and do (Actions)
- Else - Actions
-
If - Conditions
-
If - Conditions
- Wait 2.00 seconds
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Events
If you help me solve this or explain why it doesn't work I'll be forever grateful
Last edited: