- Joined
- Nov 23, 2008
- Messages
- 512
may you know the (old) version of my MissileSystem (NoParabola).
i'm still working on it but i have some problems with the GetLocationZ
i use:
-----------------
--x------xx-----
-x--x--x----xx--
x----x----------x
--_-----__------
-/--\--/----\_--
/----\/--------\_
x = missile
_ / \ = ground
i also tryed some other ways but all doesn't work
plz can somebody help me
i'm still working on it but i have some problems with the GetLocationZ
i use:
-
MS Loop
-

Ereignisse
-


Zeit - Every 0.03 seconds of game time
-
-

Bedingungen
-

Aktionen
-


Einheitengruppe - Pick every unit in MS_Missles and do (Actions)
-



Schleifen - Aktionen
-




Set MS_TempUnit[0] = (Picked unit)
-




Set MS_TempUnit[1] = (Load (Key Caster) of (Key (Picked unit)) in MS_Hash)
-




-------- ================================ --------
-




Einheit - Turn collision for MS_TempUnit[0] Aus
-




-------- ================================ --------
-




Set MS_TempReal[0] = (Load (Key Damage) of (Key (Picked unit)) from MS_Hash)
-




Set MS_TempReal[1] = (Load (Key CollisionsRad) of (Key (Picked unit)) from MS_Hash)
-




Set MS_TempReal[2] = ((Load (Key ZAngle) of (Key (Picked unit)) from MS_Hash) + 90.00)
-




Set MS_TempReal[3] = ((Cos((Load (Key ZAngle) of (Key (Picked unit)) from MS_Hash))) x (Load (Key Speed) of (Key (Picked unit)) from MS_Hash))
-




Set MS_TempReal[7] = (Load (Key DamageRad) of (Key (Picked unit)) from MS_Hash)
-




-------- ================================ --------
-




Set MS_LeakPoint[0] = (Position of (Picked unit))
-




Set MS_LeakPoint[1] = (MS_LeakPoint[0] offset by MS_TempReal[3] towards (Load (Key Angle) of (Key (Picked unit)) from MS_Hash) degrees)
-




-------- ================================ --------
-




Einheit - Move (Picked unit) instantly to MS_LeakPoint[1]
-




Einheit - Make (Picked unit) face (Load (Key Angle) of (Key (Picked unit)) from MS_Hash) over 0.00 seconds
-




-------- ================================ --------
-




-------- ================================ --------
-




Set MS_TempReal[6] = ((Load (Key NormalHeight) of (Key (Picked unit)) from MS_Hash) + ((Sin((Load (Key ZAngle) of (Key (Picked unit)) from MS_Hash))) x (Load (Key Speed) of (Key (Picked unit)) from MS_Hash)))
-




Hashtabelle - Save MS_TempReal[6] as (Key NormalHeight) of (Key (Picked unit)) in MS_Hash
-




Custom script: set udg_MS_TempReal[8]=GetLocationZ(udg_MS_LeakPoint[1])
-




Set MS_TempReal[9] = (MS_TempReal[6] + ((Load (Key StartZ) of (Key (Picked unit)) from MS_Hash) - MS_TempReal[8]))
-




Hashtabelle - Save MS_TempReal[8] as (Key StartZ) of (Key (Picked unit)) in MS_Hash
-




-------- ================================ --------
-




Animation - Change MS_TempUnit[0] flying height to MS_TempReal[9] at 0.00
-




-------- ================================ --------
-




-------- ================================ --------
-




Custom script: call SetUnitAnimationByIndex(udg_MS_TempUnit[0], R2I(udg_MS_TempReal[2]))
-




-------- ================================ --------
-




Hashtabelle - Save ((Load (Key Distance) of (Key (Picked unit)) from MS_Hash) - (Load (Key Speed) of (Key (Picked unit)) from MS_Hash)) as (Key Distance) of (Key (Picked unit)) in MS_Hash
-




Hashtabelle - Save ((Load (Key Speed) of (Key (Picked unit)) from MS_Hash) + (Load (Key SpeedIncraise) of (Key (Picked unit)) from MS_Hash)) as (Key Speed) of (Key (Picked unit)) in MS_Hash
-




-------- ================================ --------
-




Custom script: set udg_MS_KillMissle= CheckForCollision(GetLocationX(udg_MS_LeakPoint[1]),GetLocationY(udg_MS_LeakPoint[1]),GetUnitFlyHeight(udg_MS_TempUnit[0]),udg_MS_TempReal[1], GetOwningPlayer(udg_MS_TempUnit[0]))
-




-------- =========================================================================== --------
-




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





'IF'-Bedingungen
-






Or - Any (Conditions) are true
-







Bedingungen
-








MS_KillMissle Gleich True
-








(MS_PlayableMapArena contains MS_TempUnit[0]) Gleich False
-








(Current flying height of MS_TempUnit[0]) Größer gleich MS_MaxHeight
-








(Current flying height of MS_TempUnit[0]) Kleiner gleich 1.00
-








(Load (Key Distance) of (Key (Picked unit)) from MS_Hash) Kleiner gleich 0.00
-
-
-
-





'THEN'-Aktionen
-






Custom script: call DamageUnitInRange(GetLocationX(udg_MS_LeakPoint[1]),GetLocationY(udg_MS_LeakPoint[1]),GetUnitFlyHeight(udg_MS_TempUnit[0]),udg_MS_TempReal[0],udg_MS_TempReal[7],udg_MS_TempUnit[1])
-






Set MS_KillMissle = False
-






Einheitengruppe - Remove MS_TempUnit[0] from MS_Missles
-






Spezialeffekt - Destroy (Load (Key UnitSFX) of (Key (Picked unit)) in MS_Hash)
-






Custom script: call SetUnitAnimationByIndex(udg_MS_TempUnit[0], 90)
-






Spezialeffekt - Create a special effect attached to the origin of MS_TempUnit[0] using (Load (Key DeadSFX) of (Key (Picked unit)) from MS_Hash)
-






Spezialeffekt - Destroy (Last created special effect)
-






Hashtabelle - Clear all child hashtables of child (Key (Picked unit)) in MS_Hash
-






Einheit - Add a 2.00 second Standard expiration timer to MS_TempUnit[0]
-






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







'IF'-Bedingungen
-








(Number of units in MS_Missles) Gleich 0
-
-







'THEN'-Aktionen
-








Auslöser - Turn off (This trigger)
-
-







'ELSE'-Aktionen
-
-
-





'ELSE'-Aktionen
-
-




-------- ================================ --------
-




Custom script: call RemoveLocation (udg_MS_LeakPoint[0])
-




Custom script: call RemoveLocation (udg_MS_LeakPoint[1])
-
-
-
-
-----------------
--x------xx-----
-x--x--x----xx--
x----x----------x
--_-----__------
-/--\--/----\_--
/----\/--------\_
x = missile
_ / \ = ground
i also tryed some other ways but all doesn't work
plz can somebody help me




