Uszi
New Member
- Reaction score
- 5
So I want to do difficulty settings in my game, and on higher difficulties, I want the enemies to move faster, hit harder, and take more damage.
The enemies spawn in waves, btw.
So two ways to do this: Create a unit for each difficulty, so Unit01(easy), Unit01(normal) etc. This is rather tedious.
Or, I thought I could use a trigger like this:
GameDifficulty is an integer that is set when the host picks a difficulty settign.
0 is easy
1 is normal
etc, etc.
Except it doesn't look like I can use the Unit - Set Life function like that (their HP stays the same). Seems like they are moving faster though.
Is there a function that *does* let me modify their hp, etc in game, so I don't have to trigger it to spawn different custom units for each difficulty?
The enemies spawn in waves, btw.
So two ways to do this: Create a unit for each difficulty, so Unit01(easy), Unit01(normal) etc. This is rather tedious.
Or, I thought I could use a trigger like this:
Trigger:
- Modifiy zombies
- Events
- Unit - A unit enters (Playable map area)
- Conditions
- (Owner of (Entering unit)) Equal to Player 12 (Brown)
- Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- GameDifficulty Equal to 0
- Then - Actions
- Do nothing
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- GameDifficulty Equal to 1
- Then - Actions
- Unit - Set life of (Entering unit) to ((Life of (Entering unit)) x 1.25)
- Unit - Set (Entering unit) movement speed to ((Default movement speed of (Entering unit)) x 1.25)
- Unit - Add CustomDamageBuffAbility1 to (Entering unit)
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- GameDifficulty Equal to 2
- Then - Actions
- Unit - Set life of (Entering unit) to ((Life of (Entering unit)) x 1.50)
- Unit - Set (Entering unit) movement speed to ((Default movement speed of (Entering unit)) x 1.50)
- Unit - Add CustomDamageBuffAbility2 to (Entering unit)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Events
GameDifficulty is an integer that is set when the host picks a difficulty settign.
0 is easy
1 is normal
etc, etc.
Except it doesn't look like I can use the Unit - Set Life function like that (their HP stays the same). Seems like they are moving faster though.
Is there a function that *does* let me modify their hp, etc in game, so I don't have to trigger it to spawn different custom units for each difficulty?