- Joined
- Jun 27, 2011
- Messages
- 6
...Posting error
Hello everyone. I'm making a MUI spell, and i really need to save the location of the casting in a unique variable, so i created a hashtable and saved it using the unit's handle ID, but when i load it, it's pointing the center of playable map area... This is the only thing i need to fix to complete my spell, so any help will be appreciated.
Here is the all the code:
PD: Sorry for my poor english.
Hello everyone. I'm making a MUI spell, and i really need to save the location of the casting in a unique variable, so i created a hashtable and saved it using the unit's handle ID, but when i load it, it's pointing the center of playable map area... This is the only thing i need to fix to complete my spell, so any help will be appreciated.
Here is the all the code:
-
Inferno
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Inferno
-
Actions
- Set TempLocation = (Target point of ability being cast)
- Hashtable - Save Handle OfTempLocation as 0 of (Key (Triggering unit)) in InfHas
- Unit Group - Add (Triggering unit) to INFCaster
- Trigger - Turn on InfernoEff <gen>
- Wait 0.80 seconds
- Unit Group - Remove (Triggering unit) from INFCaster
-
Events
-
InfernoEff
-
Events
- Time - Every 0.04 seconds of game time
- Conditions
-
Actions
-
Unit Group - Pick every unit in INFCaster and do (Actions)
-
Loop - Actions
- Set TempLocation = (Position of (Picked unit))
- Set Temploc2 = ((Load 0 of (Key (Picked unit)) in InfHas) offset by 300.00 towards ((Facing of (Picked unit)) + (Random real number between -45.00 and 45.00)) degrees)
- Unit - Create 1 DummyFireball for (Owner of (Picked unit)) at TempLocation facing Temploc2
- Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
- Unit Group - Add (Last created unit) to INFgroup
- Trigger - Turn on InfernoLoop2 <gen>
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in INFCaster) Equal to 0
-
Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
-
Unit Group - Pick every unit in INFCaster and do (Actions)
-
Events
-
InfernoLoop
-
Events
- Time - Every 0.06 seconds of game time
- Conditions
-
Actions
-
Unit Group - Pick every unit in INFgroup and do (Actions)
-
Loop - Actions
- Set TempLocation = ((Position of (Picked unit)) offset by 56.25 towards (Facing of (Picked unit)) degrees)
- Unit - Move (Picked unit) instantly to TempLocation, facing (Facing of (Picked unit)) degrees
- Set TempLocation = (Position of (Picked unit))
- Set TempUnitGroup = (Units within 150.00 of TempLocation matching ((((Owner of (Picked unit)) is an enemy of (Owner of (Matching unit))) Equal to True) and (((Matching unit) is alive) Equal to True)))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in TempUnitGroup) Not equal to 0
-
Then - Actions
- Set TempUnit = (Picked unit)
- Unit Group - Remove (Picked unit) from INFgroup
-
Unit Group - Pick every unit in TempUnitGroup and do (Actions)
-
Loop - Actions
- Set tempreal = 151.00
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Distance between (Position of TempUnit) and (Position of (Picked unit))) Less than tempreal
-
Then - Actions
- Set tempreal = (Distance between (Position of TempUnit) and (Position of (Picked unit)))
- Set TempUnit2 = (Picked unit)
- Else - Actions
-
If - Conditions
- Unit - Cause TempUnit to damage TempUnit2, dealing 10.00 damage of attack type Spells and damage type Magic
-
Loop - Actions
- Unit - Kill (Picked unit)
- Else - Actions
-
If - Conditions
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in INFgroup) Equal to 0
-
Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
-
Unit Group - Pick every unit in INFgroup and do (Actions)
-
Events
PD: Sorry for my poor english.
Last edited by a moderator: