- Joined
- Jan 28, 2013
- Messages
- 94
Hey!
So I tried to make a mounting trigger where a Hero could use a ability to mount, either by clicking on the mount or use a ability. But for some reason it doesn't seem to work for me.
Here's the triggers:
Note. These triggers used to be in the same trigger but I separated them when I tried to check the errors.
---
The custom spells are built on:
Mount - Thunder Clap
Mount Aimed - Holy Light (couldn't target anyone...)
Mount Aimed 2 - Fire Ball (couldn't target self)
Units:
Knight - Paladin (model Captain)
Knight mounted - Paladin (model Knight)
Also, I would like this trigger to be MUI and work online. But I'm not sure how to do that...
So I tried to make a mounting trigger where a Hero could use a ability to mount, either by clicking on the mount or use a ability. But for some reason it doesn't seem to work for me.
Here's the triggers:
-
Mount
-

Events
-


Unit - A unit Begins casting an ability
-
-

Conditions
-


(Ability being cast) Equal to Mount (Dummy)
-
-

Actions
-


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



If - Conditions
-




(Owner of (Casting unit)) Equal to Player 1 (Red)
-
-



Then - Actions
-




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





If - Conditions
-






(Unit-type of (Casting unit)) Equal to Elite Knight
-
-





Then - Actions
-






Set MountPlayer1Knight = (Casting unit)
-






Set LocTempKnightPlayer1 = (Position of MountPlayer1Knight)
-






Game Cache - Store MountPlayer1Knight as MountHero of Player1Knight in Hero1Red
-






Game Cache - Save Hero1Red
-






Unit - Remove (Casting unit) from the game
-






Unit - Create 1 Elite Knight (mounted) for Player 1 (Red) at LocTempKnightPlayer1 facing Default building facing degrees
-






Game - Display to (All players) the text: Debug - Knight Saved
-
-





Else - Actions
-






Game - Display to (All players) the text: Debug - Unit Type f...
-
-
-
-



Else - Actions
-




Game - Display to (All players) the text: Debug - Player or a...
-
-
-
-
-
Dismount
-

Events
-


Unit - A unit Begins casting an ability
-
-

Conditions
-


(Ability being cast) Equal to Mount (Dummy)
-
-

Actions
-


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



If - Conditions
-




(Owner of (Casting unit)) Equal to Player 1 (Red)
-
-



Then - Actions
-




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





If - Conditions
-






(Unit-type of (Casting unit)) Equal to Elite Knight (mounted)
-
-





Then - Actions
-






Set MountPlayer1Knight = (Casting unit)
-






Set LocTempKnightPlayer1 = (Position of MountPlayer1Knight)
-






Unit - Remove MountPlayer1Knight from the game
-






Game Cache - Restore MountHero of Player1Knight from Hero1Red for Player 1 (Red) at LocTempKnightPlayer1 facing 0.00
-






Game - Display to (All players) the text: Debug - Knight rest...
-
-





Else - Actions
-






Game - Display to (All players) the text: Debug - Unit Type f...
-
-
-
-



Else - Actions
-




Game - Display to (All players) the text: Debug - Player or a...
-
-
-
-
Note. These triggers used to be in the same trigger but I separated them when I tried to check the errors.
---
-
Mounting 2
-

Events
-


Unit - A unit Begins casting an ability
-
-

Conditions
-


(Ability being cast) Equal to Mount Aimed 2 (Dummy)
-
-

Actions
-


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



If - Conditions
-




(Owner of (Casting unit)) Equal to Player 1 (Red)
-




(Unit-type of (Target unit of ability being cast)) Equal to Rental Horse
-




(Unit-type of (Casting unit)) Equal to Elite Knight
-
-



Then - Actions
-




Set MountPlayer1Knight = (Casting unit)
-




Set LocTempKnightPlayer1 = (Position of MountPlayer1Knight)
-




Unit - Remove (Casting unit) from the game
-




Unit - Create 1 Elite Knight (mounted) for Player 1 (Red) at LocTempKnightPlayer1 facing Default building facing degrees
-




Unit - Remove (Target unit of ability being cast) from the game
-
-



Else - Actions
-
-


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



If - Conditions
-




(Owner of (Casting unit)) Equal to Player 1 (Red)
-




(Unit-type of (Target unit of ability being cast)) Equal to Elite Knight (mounted)
-




(Unit-type of (Casting unit)) Equal to Elite Knight (mounted)
-
-



Then - Actions
-




Set MountPlayer1Knight = (Casting unit)
-




Set LocTempKnightPlayer1 = (Position of MountPlayer1Knight)
-




Unit - Remove (Casting unit) from the game
-




Unit - Create 1 Elite Knight for Player 1 (Red) at LocTempKnightPlayer1 facing Default building facing degrees
-




Unit - Remove (Target unit of ability being cast) from the game
-
-



Else - Actions
-
-
-
The custom spells are built on:
Mount - Thunder Clap
Mount Aimed - Holy Light (couldn't target anyone...)
Mount Aimed 2 - Fire Ball (couldn't target self)
Units:
Knight - Paladin (model Captain)
Knight mounted - Paladin (model Knight)
Also, I would like this trigger to be MUI and work online. But I'm not sure how to do that...



