• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

making drunken ability, shaking player camera

Status
Not open for further replies.
Level 12
Joined
Jul 17, 2013
Messages
544
hey i made an ability that shakes camera of player for 14 seconds when used. it works fine
upload_2020-5-14_22-38-11.png

except there is one main issue i dont know how to fix. there is 9 players in my map and if they use it in similar time then it bugs timer runing and camera can shake forever. how can i prevent it?
 
Level 30
Joined
Feb 18, 2014
Messages
3,623
Add array to the timer then do this :
  • Trigger 1
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Drunken Roar
    • Actions
      • Set Player_Index = (Player number of (Owner of (Triggering unit)))
      • Camera - Sway the camera target for (Owner of (Triggering unit)) with magnitude 4000.00 and velocity 180.00
      • Countdown Timer - Start DrunkenTimer[Player_Index] as a One-shot timer that will expire in 14.00 seconds
  • Timer Expires 1
    • Events
      • Time - DrunkenTimer[1] expires
    • Conditions
    • Actions
      • Camera - Stop swaying/shaking the camera for Player 1 (Red)
Repeat the Timer Expires 1 trigger for each player and make sure you set the size of "DrunkenTimer" to max players.
 
Status
Not open for further replies.
Top