Inscrit le: 08 Mar 2010 Messages: 243 Sujets: 54 Spécialité en worldedit: Sort sans déclencheurs
Posté le: 04/10/10 09:09 Sujet du message: Probleme de Knockback
Voila j'aurais un petit probleme de knockback...
Enfaite je voudrais que quand l'éclair tombe du ciel les unités soit comme projetter par la force de l'éclair (Pas doué en explication :p). Mais flémmard comme je suis je n'avais pas envie de réfléchirs 3heures a comment faire alors j'ai opté pour ceci:
Gui:
Trigger:
Lightning Bolt
Evénements
Unité - A unit Initie l'effet d'une compétence
Conditions
(Ability being cast) Egal à Lightning Bolt
Actions
Set LB_Target[LB_Times] = (Target unit of ability being cast) Set LB_Point[0] = (Position of LB_Target[LB_Times]) Set LB_Group = (Units within LB_Aoe[LB_Times] of LB_Point[0] matching ((((Matching unit) is Un bâtiment) Egal à FALSE) and ((((Matching unit) is alive) Egal à TRUE) and (((Matching unit) belongs to an enemy of (Owner of LB_Hero[LB_Times])) Egal à TRUE))))
Groupe unité - Pick every unit in LB_Group and do (Actions)
Boucle - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si - Conditions
LB_Index Egal à 0
Alors - Actions
Déclencheur - Turn on Lightning Bolt Loop <gen>
Sinon - Actions
Set LB_Index = (LB_Index + 1) Set LB_Times = (LB_Times + 1) Set LB_Off[LB_Times] = TRUE Set LB_PickedUnit[LB_Times] = (Picked unit) Set LB_Point[1] = (Position of LB_PickedUnit[LB_Times]) Set LB_Point[2] = (LB_Point[1] offset by 200.00 towards (Facing of LB_PickedUnit[LB_Times]) degrees) Unité - Pause LB_PickedUnit[LB_Times] Set LB_Distance[LB_Times] = (Distance between LB_Point[1] and LB_Point[2]) Set LB_Speed[LB_Times] = 12.00 Set LB_Formule[LB_Times] = (LB_Distance[LB_Times] / LB_Speed[LB_Times]) Set LB_Angle[LB_Times] = (Angle from LB_Point[1] to LB_Point[2]) Set LB_Spam[LB_Times] = 0 Unité - Cause LB_Hero[LB_Times] to damage (Picked unit), dealing LB_TotalDamage[LB_Times] damage of attack type Sorts and damage type Normal Effet spécial - Create a special effect attached to the chest of (Picked unit) using AbilitiesWeaponsBoltBoltImpact.mdl Effet spécial - Destroy (Last created special effect) Custom script: call RemoveLocation(udg_LB_Point[1]) Custom script: call RemoveLocation(udg_LB_Point[2])
Set LB_Hero[LB_Times] = (Casting unit) Set LB_Aoe[LB_Times] = 200.00 Set LB_AbilityLevel[LB_Times] = (Level of (Ability being cast) for LB_Hero[LB_Times]) Set LB_TotalDamage[LB_Times] = (75.00 x (Real(LB_AbilityLevel[LB_Times])))
For each (Integer A) from 1 to 6, do (Actions)
Boucle - Actions
Effet spécial - Create a special effect at LB_Point[0] using AbilitiesSpellsOtherMonsoonMonsoonBoltTarget.mdl Effet spécial - Destroy (Last created special effect)
Effet spécial - Create a special effect at LB_Point[0] using AbilitiesSpellsHumanThunderClapThunderClapCaster.mdl Effet spécial - Destroy (Last created special effect) Effet spécial - Create a special effect at LB_Point[0] using AbilitiesSpellsOtherCharmCharmTarget.mdl Effet spécial - Destroy (Last created special effect) Custom script: call RemoveLocation(udg_LB_Point[0]) Custom script: call DestroyGroup(udg_LB_Group)
Gui:
Trigger:
Lightning Bolt Loop
Evénements
Temps - Every 0.03 seconds of game time
Conditions
Actions
For each (Integer LB) from 1 to LB_Times, do (Actions)
Boucle - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si - Conditions
LB_Off[LB] Egal à TRUE
Alors - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si - Conditions
LB_Distance[LB] Inférieur ou égal à 0.00
Alors - Actions
Set LB_Off[LB] = FALSE Unité - Reprendre LB_PickedUnit[LB]
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si - Conditions
LB Inférieur à LB_Times
Alors - Actions
Set LB_Off[LB] = LB_Off[LB_Times] Set LB_AbilityLevel[LB] = LB_AbilityLevel[LB_Times] Set LB_Angle[LB] = LB_Angle[LB_Times] Set LB_Aoe[LB] = LB_Aoe[LB_Times] Set LB_Distance[LB] = LB_Distance[LB_Times] Set LB_Hero[LB] = LB_Hero[LB_Times] Set LB_PickedUnit[LB] = LB_PickedUnit[LB_Times] Set LB_Speed[LB] = LB_Speed[LB_Times] Set LB_Target[LB] = LB_Target[LB_Times] Set LB_TotalDamage[LB] = LB_TotalDamage[LB_Times] Set LB_Formule[LB] = LB_Formule[LB_Times]
Sinon - Actions
Set LB_Times = (LB_Times - 1) Set LB = (LB - 1) Set LB_Index = (LB_Index - 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si - Conditions
LB_Times Egal à 0
Alors - Actions
Déclencheur - Turn off Lightning Bolt Loop <gen>
Sinon - Actions
Sinon - Actions
Set LB_Distance[LB] = (LB_Distance[LB] - LB_Speed[LB]) Set LB_Point[3] = (Position of LB_PickedUnit[LB]) Set LB_Speed[LB] = (LB_Distance[LB] / LB_Formule[LB]) Set LB_Speed[LB] = (LB_Speed[LB] + 0.80) Set LB_Point[4] = (LB_Point[3] offset by LB_Speed[LB] towards LB_Angle[LB] degrees) Unité - Move LB_PickedUnit[LB] instantly to LB_Point[4] Destructible - Pick every destructible within 150.00 of LB_Point[3] and do (Destructible - Kill (Picked destructible))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si - Conditions
LB_Spam[LB] Egal à 7
Alors - Actions
Set LB_Spam[LB] = 0 Effet spécial - Create a special effect attached to the chest of LB_PickedUnit[LB] using AbilitiesWeaponsBoltBoltImpact.mdl Effet spécial - Destroy (Last created special effect)
Sinon - Actions
Set LB_Spam[LB] = (LB_Spam[LB] + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si - Conditions
Or - Any (Conditions) are true
Conditions
((Playable map area) contains LB_Point[4]) Différent de TRUE (Terrain pathing at LB_Point[4] of type En marchant is off) Egal à TRUE
Page 1 sur 1 La question posée dans ce topic a été résolue !
Vous ne pouvez pas poster de nouveaux sujets dans ce forum Vous ne pouvez pas répondre aux sujets dans ce forum Vous ne pouvez pas éditer vos messages dans ce forum Vous ne pouvez pas supprimer vos messages dans ce forum Vous ne pouvez pas voter dans les sondages de ce forum