I'm creating a "Sanity" effect, where to feel safe a hero/unit must be near another hero/unit to regain mentality. They lose that safe feeling when they leave the presence of another hero/unit (I put the range as 7.5).
Basically, units with safe behavior have slowly increasing sanity, while with Cautious they lose sanity and descend into madness.
Heres how I did it:
This is the increase/decrease for sanity:
A quick screen flash for an individual player
I wanted to do a screen flash for individual players or player groups, but I don't think I see any in triggers that would let me do that. Is there a way? Also, when I tried using Cinematic - Fade In( and Fade Out), the screen is stuck in that supposed flash.
Basically, units with safe behavior have slowly increasing sanity, while with Cautious they lose sanity and descend into madness.
Heres how I did it:
- Unit - Any Unit Enters a distance of 7.5 from (Unit 1 from (Units in (Entire map) having alliance Ally Exclude Self with player Any Player matching Required: Heroic; Excluded: Missile, Dead, Hidden, with at most Any Amount))
- Local Variables
- Conditions
-
Actions
- Unit - Add 1 Safe to (Triggering unit) from player (Owner of (Triggering unit))
- Unit - Remove 1 Cautious from (Triggering unit) from player (Owner of (Triggering unit))
- Player Group - Remove player (Owner of (Triggering unit)) from Cautious People
- Camera - Stop shaking the camera for player (Owner of (Triggering unit))
- Unit - Any Unit Leaves a distance of 7.5 from (Unit 1 from (Units in (Entire map) having alliance Ally Exclude Self with player Any Player matching Required: Heroic; Excluded: Missile, Dead, Hidden, with at most Any Amount))
- Local Variables
- Conditions
-
Actions
- Unit - Add 1 Cautious to (Triggering unit) from player (Owner of (Triggering unit))
- Unit - Remove 1 Safe from (Triggering unit) from player (Owner of (Triggering unit))
- Player Group - Add player (Owner of (Triggering unit)) to Cautious People
- Camera - Shake the camera for player (Owner of (Triggering unit)) for 0.0 seconds, with strength 2.0, frequency 2.0 Hz, and 100.0% randomness (Position: Target, Direction: XYZ)
This is the increase/decrease for sanity:
- Timer - Every 30.0 seconds of Game Time
- Local Variables
- Conditions
-
Actions
-
Player Group - Pick each player in Cautious People and do (Actions)
-
Actions
-
Unit Group - Pick each unit in (Any units in (Entire map) owned by player (Picked player) matching Required: Heroic; Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
-
Actions
- Unit - Set (Picked unit) Life to (((Picked unit) Life (Current)) - 1.0)
- Unit - Set (Picked unit) Energy to (((Picked unit) Energy (Current)) - 1.0)
-
Actions
-
Unit Group - Pick each unit in (Any units in (Entire map) owned by player (Picked player) matching Required: Heroic; Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
-
Actions
-
Unit Group - Pick each unit in (Any units in (Entire map) owned by player Any Player matching Required: Heroic; Excluded: Missile, Dead, Hidden, with at most (Convert Boolean To Integer(((Triggering unit) has Safe)))) and do (Actions)
-
Actions
- Variable - Set Sanity Count[(Owner of (Picked unit))] = (Sanity Count[(Owner of (Picked unit))] + 1)
- Text Tag - Set text of Sanity Tag[(Owner of (Picked unit))] to ("Sanity " + (Text(Sanity Count[(Owner of (Picked unit))])))
-
Actions
-
Unit Group - Pick each unit in (Any units in (Entire map) owned by player Any Player matching Required: Heroic; Excluded: Missile, Dead, Hidden, with at most (Convert Boolean To Integer(((Triggering unit) has Cautious)))) and do (Actions)
-
Actions
- Variable - Set Sanity Count[(Owner of (Picked unit))] = (Sanity Count[(Owner of (Picked unit))] - ((Stack count of Mentality on (Picked unit)) / 5))
- Text Tag - Set text of Sanity Tag[(Owner of (Picked unit))] to ("Sanity " + (Text(Sanity Count[(Owner of (Picked unit))])))
-
Actions
-
Player Group - Pick each player in Cautious People and do (Actions)
A quick screen flash for an individual player
I wanted to do a screen flash for individual players or player groups, but I don't think I see any in triggers that would let me do that. Is there a way? Also, when I tried using Cinematic - Fade In( and Fade Out), the screen is stuck in that supposed flash.