- Joined
- Nov 2, 2005
- Messages
- 21
How do you make a global variable "LocLoc"? I need to make one to fix a bug with a spell.
Ill give an example.
Fix:
Create new global variable "LocLoc"
Then change the trigger "Blast Start" to this:
Code:
Blast Start
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Blast
Actions
Custom script: local location udg_locloc
Sound - Play MarkOfChaos <gen> at 100.00% volume, located at (Target point of ability being cast) with Z offset 0.00
Sound - Play MarkOfChaos <gen> at 100.00% volume, located at (Position of (Triggering unit)) with Z offset 0.00
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Target unit of ability being cast) Not equal to No unit
Then - Actions
Set locloc = (Position of (Target unit of ability being cast))
Unit - Create 1 Blast for (Triggering player) at ((Position of (Triggering unit)) offset by 75.00 towards (Facing of (Triggering unit)) degrees) facing locloc
Custom script: call RemoveLocation(udg_locloc)
Custom script: set udg_LocLoc = null
Else - Actions
Unit - Create 1 Blast for (Triggering player) at ((Position of (Triggering unit)) offset by 75.00 towards (Facing of (Triggering unit)) degrees) facing (Target point of ability being cast)
How do I make a global variable???
Ill give an example.
Fix:
Create new global variable "LocLoc"
Then change the trigger "Blast Start" to this:
Code:
Blast Start
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Blast
Actions
Custom script: local location udg_locloc
Sound - Play MarkOfChaos <gen> at 100.00% volume, located at (Target point of ability being cast) with Z offset 0.00
Sound - Play MarkOfChaos <gen> at 100.00% volume, located at (Position of (Triggering unit)) with Z offset 0.00
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Target unit of ability being cast) Not equal to No unit
Then - Actions
Set locloc = (Position of (Target unit of ability being cast))
Unit - Create 1 Blast for (Triggering player) at ((Position of (Triggering unit)) offset by 75.00 towards (Facing of (Triggering unit)) degrees) facing locloc
Custom script: call RemoveLocation(udg_locloc)
Custom script: set udg_LocLoc = null
Else - Actions
Unit - Create 1 Blast for (Triggering player) at ((Position of (Triggering unit)) offset by 75.00 towards (Facing of (Triggering unit)) degrees) facing (Target point of ability being cast)
How do I make a global variable???