- Joined
- Jul 21, 2015
- Messages
- 271
-
MushroomAffects
-

Events
-


Unit - A unit Uses an item
-
-

Conditions
-


Or - Any (Conditions) are true
-
-

Actions
-


Set VariableSet PlayerGroupMushroom = (Player group((Owner of (Hero manipulating item))))
-


-------- Red Spotted Mushroom --------
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



Else - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






IntegerRedMush Equal to 2
-
-





Then - Actions
-






Cinematic - Clear the screen of text messages for PlayerGroupMushroom.
-






Game - Display to PlayerGroupMushroom the text: |cffff0000Red Mushr...
-






Camera - Lock camera target for (Owner of (Hero manipulating item)) to (Hero manipulating item), offset by (0.00, 0.00) using Default rotation
-






Set VariableSet PlayerMushroom = (Owner of (Hero manipulating item))
-






Unit - Change ownership of (Hero manipulating item) to Player 11 (Dark Green) and Retain color
-






Unit - Order (Hero manipulating item) to Move To (Random point in (Playable map area))
-






Selection - Add (Hero manipulating item) to selection for PlayerMushroom
-






Wait 10.00 seconds
-






Custom script: local player p=GetOwningPlayer(GetManipulatingUnit())
-






Custom script: if GetLocalPlayer()==p then
-






Custom script: call SetCineFilterTexture("ReplaceableTextures\\CameraMasks\\Black_mask.blp")
-






Custom script: call SetCineFilterStartColor(0,0,0,0)
-






Custom script: call SetCineFilterEndColor(0,0,0,255)
-






Custom script: call SetCineFilterDuration(2) // fades within 2 seconds
-






Custom script: call DisplayCineFilter(true)
-






Custom script: endif
-






Wait 2.00 seconds
-






Custom script: if GetLocalPlayer()==p then
-






Custom script: call SetCineFilterStartColor(0,0,0,255)
-






Custom script: call SetCineFilterEndColor(0,0,0,0)
-






Custom script: call SetCineFilterDuration(2)
-






Custom script: call DisplayCineFilter(true)
-






Custom script: endif
-






Custom script: set p=null
-






Wait 5.00 seconds
-






Unit - Move (Hero manipulating item) instantly to (Random point in (Playable map area))
-






Camera - Reset camera for (Owner of (Hero manipulating item)) to standard game-view over 0.00 seconds
-






Camera - Pan camera for PlayerMushroom to (Position of (Hero manipulating item)) over 0.00 seconds
-






Selection - Add (Hero manipulating item) to selection for PlayerMushroom
-






Unit - Change ownership of (Hero manipulating item) to PlayerMushroom and Retain color
-






Floating Text - Create floating text that reads How did I end up he... at ((Position of (Hero manipulating item)) offset by 200.00 towards 225.00 degrees.) with Z offset 0.00, using font size 10.00, color (100.00%, 50.00%, 0.00%), and 0.00% transparency
-






Set VariableSet FloatingTextMushroom = (Last created floating text)
-






Wait 4.00 seconds
-






Floating Text - Destroy FloatingTextMushroom
-
-





Else - Actions
-





Else - Actions
-
-
-
-
-
Hi all, so I am attempting to incorporate this fade out for local player but for some reason it does not work. My main goal is to be able to make a local player fade out if they eat an item. The fading out only happens though if the roll for an integer is met.
How the trigger is supposed to work:
1) If the integer requirement is met then, then the unit will start running and lose control, then after 10 seconds I want the player screen to fade out for 2 seconds and fade back in.
Hers how the trigger works with no custom script but it makes the screen fade out for all players which is not what I want...
-
MushroomAffects
-

Events
-


Unit - A unit Uses an item
-
-

Conditions
-


Or - Any (Conditions) are true
-



Conditions
-




(Unit-type of (Hero manipulating item)) Equal to Main Character
-




(Unit-type of (Hero manipulating item)) Equal to Main Character (ranged)
-
-
-


Or - Any (Conditions) are true
-



Conditions
-




(Item-type of (Item being manipulated)) Equal to Red Spotted Mushroom
-




(Item-type of (Item being manipulated)) Equal to Blue Spotted Mushroom
-




(Item-type of (Item being manipulated)) Equal to Green Spotted Mushroom
-
-
-
-

Actions
-


Set VariableSet PlayerGroupMushroom = (Player group((Owner of (Hero manipulating item))))
-


-------- Red Spotted Mushroom --------
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




(Item-type of (Item being manipulated)) Equal to Red Spotted Mushroom
-
-



Then - Actions
-




Set VariableSet IntegerRedMush = (Random integer number between 1 and 3)
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






IntegerRedMush Equal to 1
-
-





Then - Actions
-





Else - Actions
-






If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-







If - Conditions
-








IntegerRedMush Equal to 2
-
-







Then - Actions
-








Cinematic - Clear the screen of text messages for PlayerGroupMushroom.
-








Game - Display to PlayerGroupMushroom the text: |cffff0000Red Mushr...
-








Camera - Lock camera target for (Owner of (Hero manipulating item)) to (Hero manipulating item), offset by (0.00, 0.00) using Default rotation
-








Set VariableSet PlayerMushroom = (Owner of (Hero manipulating item))
-








Unit - Change ownership of (Hero manipulating item) to Player 11 (Dark Green) and Retain color
-








Unit - Order (Hero manipulating item) to Move To (Random point in (Playable map area))
-








Selection - Add (Hero manipulating item) to selection for PlayerMushroom
-








Wait 10.00 seconds
-








Cinematic - Fade out over 2.00 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
-








Wait 5.00 seconds
-








Unit - Move (Hero manipulating item) instantly to (Random point in (Playable map area))
-








Camera - Reset camera for (Owner of (Hero manipulating item)) to standard game-view over 0.00 seconds
-








Camera - Pan camera for PlayerMushroom to (Position of (Hero manipulating item)) over 0.00 seconds
-








Selection - Add (Hero manipulating item) to selection for PlayerMushroom
-








Cinematic - Fade in over 2.00 seconds using texture Black Mask and color (0.00%, 0.00%, 0.00%) with 0.00% transparency
-








Unit - Change ownership of (Hero manipulating item) to PlayerMushroom and Retain color
-








Floating Text - Create floating text that reads How did I end up he... at ((Position of (Hero manipulating item)) offset by 200.00 towards 225.00 degrees.) with Z offset 0.00, using font size 10.00, color (100.00%, 50.00%, 0.00%), and 0.00% transparency
-








Set VariableSet FloatingTextMushroom = (Last created floating text)
-








Wait 4.00 seconds
-








Floating Text - Destroy FloatingTextMushroom
-
-







Else - Actions
-








If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-









If - Conditions
-










IntegerRedMush Equal to 3
-
-









Then - Actions
-










Cinematic - Clear the screen of text messages for PlayerGroupMushroom.
-










Game - Display to PlayerGroupMushroom the text: |cffff0000Red Mushr...
-










Unit - Set (Hero manipulating item) movement speed to ((Default movement speed of (Hero manipulating item)) + 200.00)
-










Wait 60.00 seconds
-










Unit - Set (Hero manipulating item) movement speed to (Default movement speed of (Hero manipulating item))
-
-









Else - Actions
-
-
-
-
-
-
-
-
-
I think the solution is simply to Run a new Trigger, and use the script:
But the problem is I dont know what to change this script into a variable: local player p=GetOwningPlayer(GetManipulatingUnit())
I would like the player to be stored as a PlayerVariable: PlayerMushroom, so with that in mind how do I alter the script. Let me know if the script below is the correct solution.
-
Untitled Trigger 001 Copy 2
-

Events
-

Conditions
-

Actions
-


Custom script: local player p=GetOwningPlayer(GetManipulatingUnit())
-


Custom script: if GetLocalPlayer()==p then
-


Custom script: call SetCineFilterTexture("ReplaceableTextures\\CameraMasks\\Black_mask.blp")
-


Custom script: call SetCineFilterStartColor(0,0,0,0)
-


Custom script: call SetCineFilterEndColor(0,0,0,255)
-


Custom script: call SetCineFilterDuration(2) // fades within 2 seconds
-


Custom script: call DisplayCineFilter(true)
-


Custom script: endif
-


Wait 2.00 seconds
-


Custom script: if GetLocalPlayer()==p then
-


Custom script: call SetCineFilterStartColor(0,0,0,255)
-


Custom script: call SetCineFilterEndColor(0,0,0,0)
-


Custom script: call SetCineFilterDuration(2)
-


Custom script: call DisplayCineFilter(true)
-


Custom script: endif
-


Custom script: set p=null
-
-
-
Trigger - Run Untitled Trigger 001 <gen> (checking conditions)
-
Custom script: local player p=PlayerMushroom
Last edited:





