Inscrit le: 08 Mar 2010 Messages: 243 Sujets: 54 Spécialité en worldedit: Sort sans déclencheurs
Posté le: 07/06/10 09:26 Sujet du message: Problème a apprentissage du saut de Romstein
Bon J'ai pris le tuto de Romstein et je me suis décidé a comprendre comment réaliser un sort de saut sans défault :p.
Au début j'ai fais du simple recopiage u_u et sa donne sa:
Gui:
Trigger:
Saut du ninja Initialisation
Evénements
Map initialization
Conditions
Actions
Set Duration = 1.50 Set Zone_de_degats = 250.00 Set Degats_Par_Niveaux[1] = 200.00 Set Degats_Par_Niveaux[2] = 300.00 Set Degats_Par_Niveaux[3] = 450.00 Set String_Index[1] = AbilitiesSpellsOrcWarStompWarStompCaster.mdl
Groupe joueur - Pick every player in (All players) and do (Actions)
Boucle - Actions
Joueur - Désactiver Invulnérable- Saut du ninja for (Picked player) Joueur - Désactiver Forme de corbeau for (Picked player)
Set Location[1] = (Center of (Playable map area)) Unité - Create 1 Dummy for Neutre Passif at Location[1] facing Orientation bâtiment par défaut degrees Unité - Add Invulnérable- Saut du ninja to (Last created unit) Custom script: call RemoveLocation(udg_Location[1]) Unité - Remove (Last created unit) from the game
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si - Conditions
Duration Inférieur ou égal à 1.00
Alors - Actions
Set Duration = 1.00
Sinon - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si - Conditions
Duration Supérieur à 3.00
Alors - Actions
Set Duration = 3.00
Sinon - Actions
Gui:
Trigger:
Saut du ninja
Evénements
Unité - A unit Initie l'effet d'une compétence
Conditions
(Ability being cast) Egal à Saut de ninja
Actions
Set Custom_Value = (Custom_Value + 1) Unité - Set the custom value of (Casting unit) to Custom_Value Set Location[1] = (Position of (Casting unit)) Set Location[2] = (Target point of ability being cast) Set Angle_Index[Custom_Value] = (Angle from Location[1] to Location[2]) Set Distance_Index[Custom_Value] = (Distance between Location[1] and Location[2]) Custom script: call RemoveLocation(udg_Location[2]) Custom script: call RemoveLocation (udg_Location[1]) Set Real_Index[Custom_Value] = 0.00 Unité - Add Invulnérable- Saut du ninja to (Casting unit) Unité - Add Forme de corbeau to (Casting unit) Unité - Add classification of Une unité de type Péon to (Casting unit) Wait 0.01 seconds Unité - Order (Casting unit) to Tenir la position Animation - Change (Casting unit)'s animation speed to (85.00 / Duration)% of its original speed Unité - Turn collision for (Casting unit) Off Animation - Play (Casting unit)'s attack slam animation Groupe unité - Add (Casting unit) to Groupe_Index[1] Déclencheur - Turn on Saut du ninja mouvement <gen>
Gui:
Trigger:
Saut du ninja mouvement
Evénements
Temps - Every 0.01 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si - Conditions
(Number of units in Groupe_Index[1]) Egal à 0
Alors - Actions
Déclencheur - Turn off (This trigger)
Sinon - Actions
Groupe unité - Pick every unit in Groupe_Index[1] and do (Actions)
Boucle - Actions
Set Real_Index[(Custom value of (Picked unit))] = (Real_Index[(Custom value of (Picked unit))] + 0.01)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si - Conditions
Real_Index[(Custom value of (Picked unit))] Egal à (Duration + 0.01)
Alors - Actions
Set Unit = (Picked unit) Unité - Remove classification of Une unité de type Péon from (Picked unit) Unité - Remove Forme de corbeau from (Picked unit) Unité - Remove Invulnérable- Saut du ninja from (Picked unit) Unité - Turn collision for (Picked unit) On Animation - Reset (Picked unit)'s animation Animation - Change (Picked unit)'s animation speed to 100.00% of its original speed Groupe unité - Remove (Picked unit) from Groupe_Index[1] Set Location[1] = (Position of (Picked unit)) Effet spécial - Create a special effect at Location[1] using String_Index[1] Set Groupe_Index[2] = (Units within Zone_de_degats of Location[1] matching ((((Owner of (Matching unit)) is an enemy of (Owner of (Picked unit))) Egal à TRUE) and ((((Matching unit) is Une unité terrestre) Egal à TRUE) and (((Matching unit) is Un bâtiment) Egal à FALSE))))
Groupe unité - Pick every unit in Groupe_Index[2] and do (Actions)
Boucle - Actions
Unité - Cause Unit to damage (Picked unit), dealing Degats_Par_Niveaux[(Level of Saut de ninja for Unit)] damage of attack type Normal and damage type Normal
Set Location[1] = (Position of (Picked unit)) Set Location[2] = (Location[1] offset by Distance_Index[(Custom value of (Picked unit))] towards Angle_Index[(Custom value of (Picked unit))] degrees) Unité - Move (Picked unit) instantly to Location[2], facing Angle_Index[(Custom value of (Picked unit))] degrees Custom script: call RemoveLocation( udg_Location[2]) Custom script: call RemoveLocation( udg_Location[1])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si - Conditions
Real_Index[(Custom value of (Picked unit))] Inférieur ou égal à (Duration / 2.00)
Alors - Actions
Animation - Change (Picked unit) flying height to ((Current flying height of (Picked unit)) + (4.50 / Duration)) at 0.00
Sinon - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si - Conditions
Real_Index[(Custom value of (Picked unit))] Supérieur à (Duration / 2.00)
Alors - Actions
Animation - Change (Picked unit) flying height to ((Current flying height of (Picked unit)) - (4.50 / Duration)) at 0.00
Sinon - Actions
Mais bien sur mon sort ne marche pas u_u.
Je voudrais savoir si dans déclos (Saut du ninja initialisation) il est obligatoire de le mettre dans plusieurs déclos ou est-ce-que l'on peut tous simplement mettre les variable dans le déclos (saut de ninja)
Et est-il possible d'utiliser l'animation (spin [l'animation tourbillon de lame]) pendant le saut du maitre lame _________________
.
Alpha vs Xantgjia nouveau projet serieux en cour :
Inscrit le: 21 Fév 2010 Messages: 1785 Sujets: 22 Spécialité en worldedit: La modestie Médailles: 1 (En savoir plus...)
Posté le: 07/06/10 10:10 Sujet du message:
Si tu pouvais dire COMMENT il ne marche pas, ça éviterai vraiment des soucis...
Déjà je vois une erreur : toutes les 0.01 secondes, tu bouges ton unité sur une distance beaucoup trop grande (égale à celle qu'il devrait réaliser après le sort). Changes la ligne
Gui:
Trigger:
Set Location[2] = (Location[1] offset by Distance_Index[(Custom value of (Picked unit))] towards Angle_Index[(Custom value of (Picked unit))] degrees)
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