Hi people, thanks for the interest!
So, I am making a map, and the camera is locked in the player's hero, but i wanted to the player can chenge his camera to a unit of his own, what would be cool for scout units and things like that.
So, i made the triggers:
And after creating the ability and etc... e tested the map and got a error when i tried to use the spell:
note: actually the camera changes, but rigth after the change the error occurs.
I don't really know what is causing this error.
Thanks for the patience and attention
So, I am making a map, and the camera is locked in the player's hero, but i wanted to the player can chenge his camera to a unit of his own, what would be cool for scout units and things like that.
So, i made the triggers:
-
Lock Camera
-
Events
- Time - Every 0.50 seconds of game time
- Conditions
-
Actions
- Camera - Lock camera target for Player 1 (Red) to P1, offset by (0.00, 0.00) using Default rotation
- Camera - Lock camera target for Player 2 (Blue) to P2, offset by (0.00, 0.00) using Default rotation
- Camera - Lock camera target for Player 3 (Teal) to P3, offset by (0.00, 0.00) using Default rotation
-
Events
-
Assasin
-
Events
- Unit - A unit enters Assasin <gen>
-
Conditions
- ((Unit-type of (Triggering unit)) Equal to Wisp) and (Pick_Taken[1] Equal to 0)
-
Actions
- Set Pick_Taken[1] = 1
- Unit - Hide Assasin 0027 <gen>
- Unit - Create 1 Assasin for (Owner of (Triggering unit)) at (Center of Start <gen>) facing Default building facing degrees
- If ((Owner of (Entering unit)) Equal to Player 1 (Red)) then do (Set P1 = (Last created unit)) else do (Do nothing)
- If ((Owner of (Entering unit)) Equal to Player 1 (Red)) then do (Set P1SU = (Last created unit)) else do (Do nothing)
- If ((Owner of (Entering unit)) Equal to Player 2 (Blue)) then do (Set P2 = (Last created unit)) else do (Do nothing)
- If ((Owner of (Entering unit)) Equal to Player 2 (Blue)) then do (Set P2SU = (Last created unit)) else do (Do nothing)
- If ((Owner of (Entering unit)) Equal to Player 3 (Teal)) then do (Set P3 = (Last created unit)) else do (Do nothing)
- If ((Owner of (Entering unit)) Equal to Player 3 (Teal)) then do (Set P3SU = (Last created unit)) else do (Do nothing)
- Unit - Remove (Triggering unit) from the game
- Trigger - Camera lock <gen> (checking conditions)
-
Events
-
Change Camera
-
Events
- Unit - A unit Begins casting an ability
-
Conditions
- (Ability being cast) Equal to Camera Change
-
Actions
- If ((Owner of (Triggering unit)) Equal to Player 1 (Red)) then do (Set P1 = (Target unit of ability being cast)) else do (Do nothing)
- If ((Owner of (Triggering unit)) Equal to Player 2 (Blue)) then do (Set P2 = (Target unit of ability being cast)) else do (Do nothing)
- If ((Owner of (Triggering unit)) Equal to Player 3 (Teal)) then do (Set P3 = (Target unit of ability being cast)) else do (Do nothing)
- Unit - Remove Camera Change from (Triggering unit)
- Unit - Add Camera Change to (Target unit of ability being cast)
-
Events
-
Change Camera P1
-
Events
- Unit - A unit Dies
-
Conditions
-
Or - Any (Conditions) are true
-
Conditions
- (Triggering unit) Equal to P1
- (Triggering unit) Equal to P2
- (Triggering unit) Equal to P3
-
Conditions
- (Owner of (Triggering unit)) Equal to Player 1 (Red)
-
Or - Any (Conditions) are true
-
Actions
- If (P1 Equal to P1SU) then do (Trigger - Run Game Over P1 <gen> (checking conditions)) else do (Set P1 = P1SU)
-
Events
And after creating the ability and etc... e tested the map and got a error when i tried to use the spell:
note: actually the camera changes, but rigth after the change the error occurs.
I don't really know what is causing this error.
Thanks for the patience and attention