IF the below in GUI leaks or is really inefficient, can someone please convert it into vJASS so it's more fluid? It's 16-17 lines of code. I'm quite inexperienced in writing actual code, so that's why I ask(ed).
Anyway . . . How can I make this better?
Camera - Pan camera for Player_CamSpell[(Player number of (Triggering player))] to (Position of Unit_Cam[(Player number of (Triggering player))]) over 0.00 seconds
TO
Camera - Pan camera for Player_CamSpell[(Player number of (Triggering player))] to (Position of Unit_Cam[(Player number of (Owner of (Target unit of ability being cast)))]) over 0.00 seconds
?
It's a cool Item Spell idea I made up to where when 'High Proof Alcohol' (my Item) is thrown at / used on an enemy player / unit, their camera goes out of whack due to being drunk from the fumes, and when it wears out, it sets that affected player's camera back the way it was.
The only thing I know is 99% of it works like it's supposed to, but when it comes to resetting the affected player's camera back the way it was, it doesn't.
IF someone can tell me exactly what's wrong and exactly what to change (granted it's OK in GUI,) that would be great.
Otherwise, I need it in vJASS.
Thank You in advance.
Anyway . . . How can I make this better?
-
High Proof Alcohol
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to High Proof Alcohol
-
Actions
- Set Player_CamSpell[(Player number of (Triggering player))] = (Owner of (Target unit of ability being cast))
- Set Unit_Cam[(Player number of (Owner of (Target unit of ability being cast)))] = (Target unit of ability being cast)
- Camera - Sway the camera target for Player_CamSpell[(Player number of (Triggering player))] with magnitude 300.00 and velocity 6.00
- Camera - Sway the camera source for Player_CamSpell[(Player number of (Triggering player))] with magnitude 320.00 and velocity 7.00
- Wait 10.00 game-time seconds
- Camera - Sway the camera target for Player_CamSpell[(Player number of (Triggering player))] with magnitude 250.00 and velocity 4.00
- Camera - Sway the camera source for Player_CamSpell[(Player number of (Triggering player))] with magnitude 300.00 and velocity 6.00
- Wait 4.00 game-time seconds
- Camera - Sway the camera target for Player_CamSpell[(Player number of (Triggering player))] with magnitude 220.00 and velocity 3.00
- Camera - Sway the camera source for Player_CamSpell[(Player number of (Triggering player))] with magnitude 280.00 and velocity 3.00
- Wait 3.00 game-time seconds
- Camera - Sway the camera target for Player_CamSpell[(Player number of (Triggering player))] with magnitude 180.00 and velocity 1.00
- Camera - Sway the camera source for Player_CamSpell[(Player number of (Triggering player))] with magnitude 200.00 and velocity 1.00
- Wait 3.00 game-time seconds
- Camera - Stop swaying/shaking the camera for Player_CamSpell[(Player number of (Triggering player))]
- Camera - Pan camera for Player_CamSpell[(Player number of (Triggering player))] to (Position of Unit_Cam[(Player number of (Triggering player))]) over 0.00 seconds[/hidden]
-
Events
Camera - Pan camera for Player_CamSpell[(Player number of (Triggering player))] to (Position of Unit_Cam[(Player number of (Triggering player))]) over 0.00 seconds
TO
Camera - Pan camera for Player_CamSpell[(Player number of (Triggering player))] to (Position of Unit_Cam[(Player number of (Owner of (Target unit of ability being cast)))]) over 0.00 seconds
?
It's a cool Item Spell idea I made up to where when 'High Proof Alcohol' (my Item) is thrown at / used on an enemy player / unit, their camera goes out of whack due to being drunk from the fumes, and when it wears out, it sets that affected player's camera back the way it was.
The only thing I know is 99% of it works like it's supposed to, but when it comes to resetting the affected player's camera back the way it was, it doesn't.
IF someone can tell me exactly what's wrong and exactly what to change (granted it's OK in GUI,) that would be great.
Otherwise, I need it in vJASS.
Thank You in advance.