Vroomfondel
New Member
- Reaction score
- 0
I'm trying to make a map, where instead of gaining experience and leveling up to get skills like normal, you have to defeat certain bosses.
Whenever a player kills a boss, they get to choose 1 of the 5 skills their hero has, and then it adds a level to each skill already had. This way the player has to choose which skill they want to reach level 5 and which to reach 4, 3, etc.
The part that gives them the first skill is not finished, but is at a functional stage.
I'll just substitute the correct units and abilities when they are made. For testing, I disable the "is a hero" condition.
One other problem I'm having is making a variation on the pheonix egg ability for heroes. every part of it works right except the hero doesnt revive at the end.
I plan on making a custom ability that will just skip straight to the finish. Just a dummy spell tied to a trigger that says "Trigger - Run Pheonix egg finish <gen> (ignoring conditions)"
Whenever a player kills a boss, they get to choose 1 of the 5 skills their hero has, and then it adds a level to each skill already had. This way the player has to choose which skill they want to reach level 5 and which to reach 4, 3, etc.
The part that gives them the first skill is not finished, but is at a functional stage.
Code:
IncrementAbilities
Events
Unit - A unit enters AbilityZone <gen>
Conditions
Actions
For each (Integer A) from 1 to spawnlastboss, do (Actions)
Loop - Actions
-------------------------
Ability A
Events
Unit - A unit enters AbilityTake1 <gen>
Conditions
((Triggering unit) is A Hero) Equal to True
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Triggering unit)) Equal to Footman
Then - Actions
Unit - Add Acid Bomb to (Triggering unit)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Triggering unit)) Equal to Knight
Then - Actions
Unit - Add Animate Dead to (Triggering unit)
Else - Actions
I'll just substitute the correct units and abilities when they are made. For testing, I disable the "is a hero" condition.
One other problem I'm having is making a variation on the pheonix egg ability for heroes. every part of it works right except the hero doesnt revive at the end.
Code:
Pheonix egg
Events
Unit - A unit owned by Player 1 (Red) Dies
Conditions
((Triggering unit) is A Hero) Equal to True
Actions
Set HeroDeathSpot[0] = (Position of (Dying unit))
Set HeroPC[0] = (Dying unit)
Unit - Create 1 Hero Egg for Player 1 (Red) at (Position of (Dying unit)) facing Default building facing degrees
Set HeroEgg[0] = (Last created unit)
Set x = 10
Wait 10.00 seconds
Trigger - Run Pheonix egg finish <gen> (checking conditions)
------------------------
Pheonix egg finish
Events
Conditions
(HeroEgg[0] is alive) Equal to True
Actions
Unit - Remove HeroEgg[0] from the game
Hero - Instantly revive HeroPC[0] at HeroDeathSpot[0], Show revival graphics
I plan on making a custom ability that will just skip straight to the finish. Just a dummy spell tied to a trigger that says "Trigger - Run Pheonix egg finish <gen> (ignoring conditions)"