Inscrit le: 06 Juin 2008 Messages: 634 Sujets: 38 Spécialité en worldedit: Manger des pommes à la sauce Jass.
Posté le: 16/08/08 15:07 Sujet du message:
Pourtant, dans le sujet donné en lien, cette technique marche très bien !
Tu compare les angles des 2 unités. Exemple :
Gui:
Trigger:
Attackparderriere
Evénements
Unité - Une unité Commence le lancement d'une compétence.
Conditions
(Angle d'orientation de (Unité ciblée par la compétence)) Supérieur ou égal à ((Angle d'orientation de (Unité ciblée par la compétence)) + 130.00) (Angle d'orientation de (Unité ciblée par la compétence)) Inférieur ou égal à ((Angle d'orientation de (Unité ciblée par la compétence)) + 230.00) (Compétence étant utilisée) Egal à Réanimation
Actions
Unité - Faire que (Unité déclencheuse) cause des dommages à (Unité ciblée par la compétence), répartissant 200.00 points de dégâts de type Héros et dommages de type Normal.
Si l'unité est derrière l'autre , elle fera des dommages. Sinon, elle ne fera rien. Il y a un écart de 100° Si l'unité n'est pas complétement derrière, cela ne marche pas. Si tui veux un angle plus grand, change 130 et 230 respectivement par 90 et 270. _________________
Inscrit le: 21 Aoû 2007 Messages: 469 Sujets: 7 Spécialité en worldedit: Jass, me voila !
Posté le: 16/08/08 15:53 Sujet du message:
Attaquer par derrière, say le mal !
Sinon je viens d'essayer la proposition de Cobrand et elle fonctionne à merveille !
Poste ton trigger qu'on vérifie tout ça _________________
"Yamini madoishi haware na kage yo,
Hito kizutsuke hotoshimete,
Sore ni moborushiko no tameni...
Ippen, shinde miru ?" Enma Ai, Jigoku Shoujo.
Inscrit le: 16 Sep 2007 Messages: 139 Sujets: 18 Spécialité en worldedit: vous demandez de l'aide :P
Posté le: 16/08/08 15:58 Sujet du message:
Gui:
Trigger:
Evénements
Unité - A unit Commence le lancement d'une compétence
Conditions
(Ability being cast) Egal à Traîtrise
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si - Conditions
(Facing of (Target unit of ability being cast)) Supérieur ou égal à ((Facing of (Target unit of ability being cast)) + 130) (Facing of (Target unit of ability being cast)) Inférieur ou égal à ((Facing of (Target unit of ability being cast)) + 230.00)
Alors - Actions
Unité - Kill (Target unit of ability being cast)
Sinon - Actions
_________________
Dernière édition par Gardowat.9Rock le 18/10/08 14:59; édité 1 fois
Inscrit le: 16 Sep 2007 Messages: 139 Sujets: 18 Spécialité en worldedit: vous demandez de l'aide :P
Posté le: 16/08/08 16:15 Sujet du message:
J'ai essayé ça, je crois comme ta dis Rommstein60 mais ça marche toujours pas
Gui:
Trigger:
Evénements
Unité - A unit Commence le lancement d'une compétence
Conditions
(Ability being cast) Egal à Traîtrise
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si - Conditions
(Facing of (Casting unit)) Supérieur ou égal à ((Facing of (Target unit of ability being cast)) + 130.00) (Facing of (Casting unit)) Inférieur ou égal à ((Facing of (Target unit of ability being cast)) + 230.00)
Alors - Actions
Unité - Kill (Target unit of ability being cast)
Sinon - Actions
_________________
Dernière édition par Gardowat.9Rock le 18/10/08 14:59; édité 1 fois
Inscrit le: 06 Juin 2008 Messages: 634 Sujets: 38 Spécialité en worldedit: Manger des pommes à la sauce Jass.
Posté le: 16/08/08 16:22 Sujet du message:
Au lieu de +230 essaie -130 ? On sait jamais ca peut venir de ca. Sinon je vois vraiment pas.Tu peut faire sinon "Pick every unit" et mettre le cercle de centre point décalée ... _________________
Inscrit le: 16 Sep 2007 Messages: 139 Sujets: 18 Spécialité en worldedit: vous demandez de l'aide :P
Posté le: 16/08/08 16:42 Sujet du message:
C'est bon j'ai réussi merci à tous !
Gui:
Trigger:
Evénements
Unité - A unit Commence le lancement d'une compétence
Conditions
(Ability being cast) Egal à Traîtrise
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si - Conditions
(Facing of (Casting unit)) Supérieur ou égal à ((Facing of (Target unit of ability being cast)) - 130.00) (Facing of (Casting unit)) Inférieur ou égal à ((Facing of (Target unit of ability being cast)) + 130.00)
Alors - Actions
Unité - Kill (Target unit of ability being cast)
Sinon - Actions
_________________
Dernière édition par Gardowat.9Rock le 18/10/08 14:59; édité 1 fois
Inscrit le: 08 Jan 2009 Messages: 46 Sujets: 7 Spécialité en worldedit: Je suis touche-à-tout !! (ne dites pas que j'ai dit ce que je n'ai pas dit...) J'édite pour le lan.
Posté le: 13/01/09 17:27 Sujet du message:
Je sais que ce sujet remonte à quelques mois mais j'ai une question : est ce que ce sort marche si l'unité à comme angle 0° et le casting unité 360° ?? L'unité est derrière, mais 360 - 0 = 360, sa devrait pas marché, enfin, normalement... _________________
Rêve de tes pas
Ombre de ta marche
Voleur de l'ombre
Inscrit le: 21 Avr 2008 Messages: 1607 Sujets: 81 Spécialité en worldedit: Utiliser le travail des autres Médailles: 3 (En savoir plus...)
Posté le: 13/01/09 18:27 Sujet du message:
Non car 0°=360°
Dans les déclos, je crois que 0=l'angle en face de l'unité.
Le déclo de Gardowat est bon mais je suis pas certain du post de Max4938. C'est ça qui t'a trompé. _________________
Inscrit le: 08 Jan 2009 Messages: 46 Sujets: 7 Spécialité en worldedit: Je suis touche-à-tout !! (ne dites pas que j'ai dit ce que je n'ai pas dit...) J'édite pour le lan.
Posté le: 14/01/09 14:13 Sujet du message:
J'ais testé un déclo du même type il y a quelques mois et sa ne marchait pas si l'unité avait dans les 5° ou quand elle avait dans les 355°. J'avais réussi à résoudre le problème, mais je c'est plus comment... _________________
Rêve de tes pas
Ombre de ta marche
Voleur de l'ombre
J'ai refait un trigger du même genre pour ma carte.
Le principe: lorsqu'une unité arrive devant le char (à plus ou moins un réel, parce que le char est gros, il faut donc que le cône de détection soit gros), l'unité est attaquée par le char.
C'est donc en partie en jass.
Trigger 1: attribution de l'unité.
Secret:
Gui:
Trigger:
S 29 Tank Drive ecrasement ini Events Unit - A unit enters (Playable map area) Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Triggering unit)) Equal to Individual Micro Tank
Then - Actions Set Sort_29_entier = (Sort_29_entier + 1) Set Sort_29_char[Sort_29_entier] = (Triggering unit) Trigger - Add to S 29 Tank Drive ecrasement action <gen> the event (Unit - A unit comes within 150.00 of Sort_29_char[Sort_29_entier]) Else - Actions
Trigger 2: ecrasement
Secret:
Jass:
function Trig_S_29_Tank_Drive_ecrasement_action_Func002C takes unit char, unit u, location point returns boolean
if ( not ( GetUnitFacing(char) >= ( AngleBetweenPoints(GetUnitLoc(char), point) - 70.00 ) ) ) then
return false
endif
if ( not ( GetUnitFacing(char) <= ( AngleBetweenPoints(GetUnitLoc(char), point) + 70.00 ) ) ) then
return false
endif
if ( not ( IsUnitType(u, UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
if ( not ( IsUnitType(u, UNIT_TYPE_HERO) == false ) ) then
return false
endif
if ( not ( GetOwningPlayer(u) != Player(0) ) ) then
return false
endif
if ( not ( GetOwningPlayer(u) != Player(1) ) ) then
return false
endif
if ( not ( GetOwningPlayer(u) != Player(2) ) ) then
return false
endif
if ( not ( GetOwningPlayer(u) != Player(3) ) ) then
return false
endif
if ( not ( GetOwningPlayer(u) != Player(4) ) ) then
return false
endif
if ( not ( GetOwningPlayer(u) != Player(5) ) ) then
return false
endif
if ( not ( GetOwningPlayer(u) != Player(6) ) ) then
return false
endif
if ( not ( GetOwningPlayer(u) != Player(7) ) ) then
return false
endif
if ( not ( GetOwningPlayer(u) != Player(8) ) ) then
return false
endif
if ( not ( GetOwningPlayer(u) != Player(9) ) ) then
return false
endif
return true
endfunction
function Trig_S_29_Tank_Drive_ecrasement_action_Actions takes nothing returns nothing
local location point = GetUnitLoc(GetTriggerUnit())
local effect e
local unit char = udg_Sort_29_char[udg_Sort_29_entier]
local unit u = GetTriggerUnit()
if ( Trig_S_29_Tank_Drive_ecrasement_action_Func002C(char, u, point) ) then
call AddSpecialEffectLocBJ(point, "ObjectsSpawnmodelsUndeadImpaleTargetDustImpaleTargetDust.mdl")
set e = GetLastCreatedEffectBJ()
set udg_Sort_29_char2 = char
call IssuePointOrderLocBJ( char, "move", point )
call UnitDamageTargetBJ( char, u, 30, ATTACK_TYPE_MELEE, DAMAGE_TYPE_NORMAL )
call TriggerSleepAction(2.00)
call DestroyEffectBJ( e )
else
endif
endfunction
//===========================================================================
function InitTrig_S_29_Tank_Drive_ecrasement_action takes nothing returns nothing
set gg_trg_S_29_Tank_Drive_ecrasement_action = CreateTrigger( )
call TriggerAddAction( gg_trg_S_29_Tank_Drive_ecrasement_action, function Trig_S_29_Tank_Drive_ecrasement_action_Actions )
endfunction
Et voici en GUI un sort de ma carte Savagery, le Vicious Hit de l'assassin, qui doit être ce que tu recherches du point de vue de l'angle(mais en Gui, et il s'agit d'une compétence, cette fois).
Secret:
Gui:
Trigger:
A Vicious Hit Events Unit - A unit Begins casting an ability Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Ability being cast) Equal to A 2 Vicious Hit (Level of A 2 Vicious Hit for (Casting unit)) Equal to 1 (Facing of (Casting unit)) Greater than or equal to ((Facing of (Target unit of ability being cast)) - 130.00) (Facing of (Casting unit)) Less than or equal to ((Facing of (Target unit of ability being cast)) + 130.00)
Then - Actions Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing 500.00 damage of attack type Pierce and damage type Universal Special Effect - Create a special effect attached to the (weapon + right) of (Casting unit) using AbilitiesSpellsOtherForkedLightningForkedLightningTarget.mdl Wait 0.75 seconds Special Effect - Destroy (Last created special effect) Else - Actions Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Ability being cast) Equal to A 2 Vicious Hit (Level of A 2 Vicious Hit for (Casting unit)) Equal to 2 (Facing of (Casting unit)) Greater than or equal to ((Facing of (Target unit of ability being cast)) - 130.00) (Facing of (Casting unit)) Less than or equal to ((Facing of (Target unit of ability being cast)) + 130.00)
Then - Actions Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing 1000.00 damage of attack type Pierce and damage type Universal Special Effect - Create a special effect attached to the (weapon + right) of (Casting unit) using AbilitiesSpellsOtherForkedLightningForkedLightningTarget.mdl Wait 0.75 seconds Special Effect - Destroy (Last created special effect) Else - Actions Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Ability being cast) Equal to A 2 Vicious Hit (Level of A 2 Vicious Hit for (Casting unit)) Equal to 3 (Facing of (Casting unit)) Greater than or equal to ((Facing of (Target unit of ability being cast)) - 130.00) (Facing of (Casting unit)) Less than or equal to ((Facing of (Target unit of ability being cast)) + 130.00)
Then - Actions Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing 2000.00 damage of attack type Pierce and damage type Universal Special Effect - Create a special effect attached to the (weapon + right) of (Casting unit) using AbilitiesSpellsOtherForkedLightningForkedLightningTarget.mdl Wait 0.75 seconds Special Effect - Destroy (Last created special effect) Else - Actions Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Ability being cast) Equal to A 2 Vicious Hit (Level of A 2 Vicious Hit for (Casting unit)) Equal to 4 (Facing of (Casting unit)) Greater than or equal to ((Facing of (Target unit of ability being cast)) - 130.00) (Facing of (Casting unit)) Less than or equal to ((Facing of (Target unit of ability being cast)) + 130.00)
Then - Actions Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing 4000.00 damage of attack type Pierce and damage type Universal Special Effect - Create a special effect attached to the (weapon + right) of (Casting unit) using AbilitiesSpellsOtherForkedLightningForkedLightningTarget.mdl Set Avicioushit_effect = (Last created special effect) Wait 0.75 seconds Special Effect - Destroy Avicioushit_effect Else - Actions Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Ability being cast) Equal to A 2 Vicious Hit (Level of A 2 Vicious Hit for (Casting unit)) Equal to 4 A_jump_booleen[(Player number of (Owner of (Casting unit)))] Equal to True (Facing of (Casting unit)) Greater than or equal to ((Facing of (Target unit of ability being cast)) - 130.00) (Facing of (Casting unit)) Less than or equal to ((Facing of (Target unit of ability being cast)) + 130.00)
Then - Actions Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing 7000.00 damage of attack type Pierce and damage type Universal Special Effect - Create a special effect attached to the (weapon + right) of (Casting unit) using AbilitiesSpellsOtherForkedLightningForkedLightningTarget.mdl Set Avicioushit_effect = (Last created special effect) Wait 0.75 seconds Special Effect - Destroy Avicioushit_effect Else - Actions Do nothing
Inscrit le: 21 Avr 2008 Messages: 1607 Sujets: 81 Spécialité en worldedit: Utiliser le travail des autres Médailles: 3 (En savoir plus...)
Posté le: 15/01/09 00:04 Sujet du message:
Il a l'air génial ton sort! Cependant attention, l'effet spécial n'est pas stocké à chaque fois, et il y a un wait 0.75 second avant la destruction de cet effet (là c'est last created effect). De plus tu aurais pu simplifier en mettant les damages en fonction du level, plutôt que de tout répéter à chaque fois. _________________
Toutes les heures sont au format GMT + 1 Heure Aller à la page 1, 2Suivante
Page 1 sur 2 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