Inscrit le: 14 Oct 2009 Messages: 719 Sujets: 40 Spécialité en worldedit: Les bugs Médailles: 1 (En savoir plus...)
Posté le: 24/01/10 15:42 Sujet du message: Ce n'est vraiment pas fait pour moi le Jass!
Je suis en train de faire des sorts et je ne comprends pas ce qui bug malgré les nombreux tutos sur les fuites de mémoire.
Voilà un premier sort qui ne veut pas s'activer:
Secret:
Gui:
Trigger:
Feu stellaire
Evénements
Unité - A unit Initie l'effet d'une compétence
Conditions
((Ability being cast) Egal à |cffffcc00F|r|cffffcc55eu stellaire|r )
Actions
Custom script: local unit udg_LocalSortsUnit Custom script: local point udg_LocalSortsPoint Set LocalSortsUnit = (Target unit of ability being cast) Set LocalSortsPoint = (Position of LocalSortsUnit) Effet spécial - Create a special effect at LocalSortsPoint using AbilitiesSpellsItemsAIreAIreTarget.mdl Effet spécial - Destroy LocalSortsEffet Custom script: call RemoveLocation( udg_LocalSortsPoint) If ((Level of |cffffcc00F|r|cffffcc55eu stellaire|r for (Triggering unit)) Egal à 1) then do (Unité - Cause (Triggering unit) to damage LocalSortsUnit, dealing 15.00 damage of attack type Sorts and damage type Normal) else do (Do nothing) If ((Level of |cffffcc00F|r|cffffcc55eu stellaire|r for (Triggering unit)) Egal à 2) then do (Unité - Cause (Triggering unit) to damage LocalSortsUnit, dealing 30.00 damage of attack type Sorts and damage type Normal) else do (Do nothing) If ((Level of |cffffcc00F|r|cffffcc55eu stellaire|r for (Triggering unit)) Egal à 3) then do (Unité - Cause (Triggering unit) to damage LocalSortsUnit, dealing 60.00 damage of attack type Sorts and damage type Normal) else do (Do nothing) If ((Level of |cffffcc00F|r|cffffcc55eu stellaire|r for (Triggering unit)) Egal à 4) then do (Unité - Cause (Triggering unit) to damage LocalSortsUnit, dealing 120.00 damage of attack type Sorts and damage type Normal) else do (Do nothing) If ((Level of |cffffcc00F|r|cffffcc55eu stellaire|r for (Triggering unit)) Egal à 5) then do (Unité - Cause (Triggering unit) to damage LocalSortsUnit, dealing 200.00 damage of attack type Sorts and damage type Normal) else do (Do nothing) If ((Level of |cffffcc00F|r|cffffcc55eu stellaire|r for (Triggering unit)) Egal à 6) then do (Unité - Cause (Triggering unit) to damage LocalSortsUnit, dealing 300.00 damage of attack type Sorts and damage type Normal) else do (Do nothing) If ((Level of |cffffcc00F|r|cffffcc55eu stellaire|r for (Triggering unit)) Egal à 7) then do (Unité - Cause (Triggering unit) to damage LocalSortsUnit, dealing 375.00 damage of attack type Sorts and damage type Normal) else do (Do nothing) If ((Level of |cffffcc00F|r|cffffcc55eu stellaire|r for (Triggering unit)) Egal à 8) then do (Unité - Cause (Triggering unit) to damage LocalSortsUnit, dealing 450.00 damage of attack type Sorts and damage type Normal) else do (Do nothing) If ((Level of |cffffcc00F|r|cffffcc55eu stellaire|r for (Triggering unit)) Egal à 9) then do (Unité - Cause (Triggering unit) to damage LocalSortsUnit, dealing 520.00 damage of attack type Sorts and damage type Normal) else do (Do nothing) If ((Level of |cffffcc00F|r|cffffcc55eu stellaire|r for (Triggering unit)) Egal à 10) then do (Unité - Cause (Triggering unit) to damage LocalSortsUnit, dealing 600.00 damage of attack type Sorts and damage type Normal) else do (Do nothing)
For each (Integer A) from 1 to 4, do (Actions)
Boucle - Actions
Custom script: set bj_wantDestroyGroup = true
Groupe unité - Pick every unit in (Units within 512.00 of (Position of LocalSortsUnit)) and do (Actions)
Boucle - Actions
Wait 3.00 seconds
Groupe joueur - Pick every player in (All enemies of (Owner of (Triggering unit))) and do (Actions)
Boucle - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si - Conditions
And - All (Conditions) are true
Conditions
(Owner of (Picked unit)) Egal à (Picked player) (LocalSortsUnit is alive) Egal à TRUE
Alors - Actions
Set LocalSortsPoint = (Position of LocalSortsUnit) Effet spécial - Create a special effect at LocalSortsPoint using AbilitiesSpellsItemsAIreAIreTarget.mdl Effet spécial - Destroy LocalSortsEffet Custom script: call RemoveLocation( udg_LocalSortsPoint) If ((Level of |cffffcc00F|r|cffffcc55eu stellaire|r for (Triggering unit)) Egal à 1) then do (Unité - Cause (Triggering unit) to damage LocalSortsUnit, dealing 20.00 damage of attack type Sorts and damage type Normal) else do (Do nothing) If ((Level of |cffffcc00F|r|cffffcc55eu stellaire|r for (Triggering unit)) Egal à 2) then do (Unité - Cause (Triggering unit) to damage LocalSortsUnit, dealing 40.00 damage of attack type Sorts and damage type Normal) else do (Do nothing) If ((Level of |cffffcc00F|r|cffffcc55eu stellaire|r for (Triggering unit)) Egal à 3) then do (Unité - Cause (Triggering unit) to damage LocalSortsUnit, dealing 80.00 damage of attack type Sorts and damage type Normal) else do (Do nothing) If ((Level of |cffffcc00F|r|cffffcc55eu stellaire|r for (Triggering unit)) Egal à 4) then do (Unité - Cause (Triggering unit) to damage LocalSortsUnit, dealing 160.00 damage of attack type Sorts and damage type Normal) else do (Do nothing) If ((Level of |cffffcc00F|r|cffffcc55eu stellaire|r for (Triggering unit)) Egal à 5) then do (Unité - Cause (Triggering unit) to damage LocalSortsUnit, dealing 240.00 damage of attack type Sorts and damage type Normal) else do (Do nothing) If ((Level of |cffffcc00F|r|cffffcc55eu stellaire|r for (Triggering unit)) Egal à 6) then do (Unité - Cause (Triggering unit) to damage LocalSortsUnit, dealing 380.00 damage of attack type Sorts and damage type Normal) else do (Do nothing) If ((Level of |cffffcc00F|r|cffffcc55eu stellaire|r for (Triggering unit)) Egal à 7) then do (Unité - Cause (Triggering unit) to damage LocalSortsUnit, dealing 450.00 damage of attack type Sorts and damage type Normal) else do (Do nothing) If ((Level of |cffffcc00F|r|cffffcc55eu stellaire|r for (Triggering unit)) Egal à 8) then do (Unité - Cause (Triggering unit) to damage LocalSortsUnit, dealing 510.00 damage of attack type Sorts and damage type Normal) else do (Do nothing) If ((Level of |cffffcc00F|r|cffffcc55eu stellaire|r for (Triggering unit)) Egal à 9) then do (Unité - Cause (Triggering unit) to damage LocalSortsUnit, dealing 565.00 damage of attack type Sorts and damage type Normal) else do (Do nothing) If ((Level of |cffffcc00F|r|cffffcc55eu stellaire|r for (Triggering unit)) Egal à 10) then do (Unité - Cause (Triggering unit) to damage LocalSortsUnit, dealing 640.00 damage of attack type Sorts and damage type Normal) else do (Do nothing)
Sinon - Actions
Et voilà un début de 2ème sort:
Secret:
Gui:
Trigger:
Foret dechainee
Evénements
Unité - A unit Initie l'effet d'une compétence
Conditions
((Ability being cast) Egal à |cffffcc00F|r|cffffcc55orêt déchaînée|r )
Actions
Wait 0.25 seconds Custom script: local point udg_LocalSortsPoint Set LocalSortsPoint = (Position of (Target unit of ability being cast)) If (((Level of |cffffcc00F|r|cffffcc55orêt déchaînée|r for (Triggering unit)) Egal à 1) or ((Level of |cffffcc00F|r|cffffcc55orêt déchaînée|r for (Triggering unit)) Egal à 2)) then do (Unité - Create 2 Fantassin for (Owner of (Triggering unit)) at LocalSortsPoint facing (Random angle) degrees) else do (Do nothing) Custom script: call RemoveLocation(udg_LocalSortsPoint)
Sur les 2 déclos we me dit: "Attendait une réponse". _________________
Inscrit le: 14 Oct 2009 Messages: 719 Sujets: 40 Spécialité en worldedit: Les bugs Médailles: 1 (En savoir plus...)
Posté le: 24/01/10 16:19 Sujet du message:
Bin si les custom script c'est du Jass!
Dans le premier déclencheur je n'ai rien compris à ce que tu as dis.
Dans le deuxième j'ai déjà mis le wait après la déclaration mais ça n'a rien changé!
Secret:
Gui:
Trigger:
Foret dechainee
Evénements
Unité - A unit Initie l'effet d'une compétence
Conditions
((Ability being cast) Egal à |cffffcc00F|r|cffffcc55orêt déchaînée|r ) and ((Unit-type of (Triggering unit)) Egal à (Unit-type of (Triggering unit)))
Actions
Custom script: local point udg_LocalSortsPoint Set LocalSortsPoint = (Position of (Target unit of ability being cast)) Wait 0.25 seconds Effet spécial - Create a special effect at LocalSortsPoint using AbilitiesSpellsNightElfTauntTauntCaster.mdl Effet spécial - Destroy (Last created special effect) If (((Level of |cffffcc00F|r|cffffcc55orêt déchaînée|r for (Triggering unit)) Egal à 1) or ((Level of |cffffcc00F|r|cffffcc55orêt déchaînée|r for (Triggering unit)) Egal à 2)) then do (Unité - Create 2 Fantassin for (Owner of (Triggering unit)) at LocalSortsPoint facing (Random angle) degrees) else do (Do nothing) If (((Level of |cffffcc00F|r|cffffcc55orêt déchaînée|r for (Triggering unit)) Egal à 3) or ((Level of |cffffcc00F|r|cffffcc55orêt déchaînée|r for (Triggering unit)) Egal à 4)) then do (Unité - Create 3 Fantassin for (Owner of (Triggering unit)) at LocalSortsPoint facing (Random angle) degrees) else do (Do nothing) If (((Level of |cffffcc00F|r|cffffcc55orêt déchaînée|r for (Triggering unit)) Egal à 5) or ((Level of |cffffcc00F|r|cffffcc55orêt déchaînée|r for (Triggering unit)) Egal à 6)) then do (Unité - Create 4 Fantassin for (Owner of (Triggering unit)) at LocalSortsPoint facing (Random angle) degrees) else do (Do nothing) If (((Level of |cffffcc00F|r|cffffcc55orêt déchaînée|r for (Triggering unit)) Egal à 7) or ((Level of |cffffcc00F|r|cffffcc55orêt déchaînée|r for (Triggering unit)) Egal à 8)) then do (Unité - Create 5 Fantassin for (Owner of (Triggering unit)) at LocalSortsPoint facing (Random angle) degrees) else do (Do nothing) If (((Level of |cffffcc00F|r|cffffcc55orêt déchaînée|r for (Triggering unit)) Egal à 9) or ((Level of |cffffcc00F|r|cffffcc55orêt déchaînée|r for (Triggering unit)) Egal à 10)) then do (Unité - Create 6 Fantassin for (Owner of (Triggering unit)) at LocalSortsPoint facing (Random angle) degrees) else do (Do nothing) Custom script: call RemoveLocation(udg_LocalSortsPoint)
Retire le udg_. C'est utilisé pour les variables globales. Essaye en le retirant au niveau des déclarations. Et montre ton déclencheur après les changements que je t'ais proposés
Inscrit le: 14 Oct 2009 Messages: 719 Sujets: 40 Spécialité en worldedit: Les bugs Médailles: 1 (En savoir plus...)
Posté le: 25/01/10 17:46 Sujet du message:
Secret:
louisdespi a écrit:
Jass:
local point udg_LocalSortsPoint
Jass:
local unit udg_LocalSortsUnit
Retire le udg_. C'est utilisé pour les variables globales. Essaye en le retirant au niveau des déclarations. Et montre ton déclencheur après les changements que je t'ais proposés
↕
Jass:
local point LocalSortsPoint
Jass:
local unit LocalSortsUnit
Bindans le tuto des variables locales il dit qu'il faut le mettre le udg_ .
Je vais essayer mais bon...
Voilà le nouveau déclencheur mais ça marche pas .
Secret:
Gui:
Trigger:
Feu stellaire
Evénements
Unité - A unit Initie l'effet d'une compétence
Conditions
((Ability being cast) Egal à |cffffcc00F|r|cffffcc55eu stellaire|r ) and ((Unit-type of (Triggering unit)) Egal à (Unit-type of (Triggering unit)))
Actions
Custom script: local unit LocalSortsUnit Custom script: local point LocalSortsPoint Set LocalSortsUnit = (Target unit of ability being cast) Set LocalSortsPoint = (Position of LocalSortsUnit) Effet spécial - Create a special effect at LocalSortsPoint using AbilitiesSpellsItemsAIreAIreTarget.mdl Effet spécial - Destroy LocalSortsEffet Custom script: call RemoveLocation( udg_LocalSortsPoint) If ((Level of |cffffcc00F|r|cffffcc55eu stellaire|r for (Triggering unit)) Egal à 1) then do (Unité - Cause (Triggering unit) to damage LocalSortsUnit, dealing 15.00 damage of attack type Sorts and damage type Normal) else do (Do nothing) If ((Level of |cffffcc00F|r|cffffcc55eu stellaire|r for (Triggering unit)) Egal à 2) then do (Unité - Cause (Triggering unit) to damage LocalSortsUnit, dealing 30.00 damage of attack type Sorts and damage type Normal) else do (Do nothing) If ((Level of |cffffcc00F|r|cffffcc55eu stellaire|r for (Triggering unit)) Egal à 3) then do (Unité - Cause (Triggering unit) to damage LocalSortsUnit, dealing 60.00 damage of attack type Sorts and damage type Normal) else do (Do nothing) If ((Level of |cffffcc00F|r|cffffcc55eu stellaire|r for (Triggering unit)) Egal à 4) then do (Unité - Cause (Triggering unit) to damage LocalSortsUnit, dealing 120.00 damage of attack type Sorts and damage type Normal) else do (Do nothing) If ((Level of |cffffcc00F|r|cffffcc55eu stellaire|r for (Triggering unit)) Egal à 5) then do (Unité - Cause (Triggering unit) to damage LocalSortsUnit, dealing 200.00 damage of attack type Sorts and damage type Normal) else do (Do nothing) If ((Level of |cffffcc00F|r|cffffcc55eu stellaire|r for (Triggering unit)) Egal à 6) then do (Unité - Cause (Triggering unit) to damage LocalSortsUnit, dealing 300.00 damage of attack type Sorts and damage type Normal) else do (Do nothing) If ((Level of |cffffcc00F|r|cffffcc55eu stellaire|r for (Triggering unit)) Egal à 7) then do (Unité - Cause (Triggering unit) to damage LocalSortsUnit, dealing 375.00 damage of attack type Sorts and damage type Normal) else do (Do nothing) If ((Level of |cffffcc00F|r|cffffcc55eu stellaire|r for (Triggering unit)) Egal à 8) then do (Unité - Cause (Triggering unit) to damage LocalSortsUnit, dealing 450.00 damage of attack type Sorts and damage type Normal) else do (Do nothing) If ((Level of |cffffcc00F|r|cffffcc55eu stellaire|r for (Triggering unit)) Egal à 9) then do (Unité - Cause (Triggering unit) to damage LocalSortsUnit, dealing 520.00 damage of attack type Sorts and damage type Normal) else do (Do nothing) If ((Level of |cffffcc00F|r|cffffcc55eu stellaire|r for (Triggering unit)) Egal à 10) then do (Unité - Cause (Triggering unit) to damage LocalSortsUnit, dealing 600.00 damage of attack type Sorts and damage type Normal) else do (Do nothing)
For each (Integer A) from 1 to 4, do (Actions)
Boucle - Actions
Custom script: set bj_wantDestroyGroup = true
Groupe unité - Pick every unit in (Units within 512.00 of (Position of LocalSortsUnit)) and do (Actions)
Boucle - Actions
Wait 3.00 seconds
Groupe joueur - Pick every player in (All enemies of (Owner of (Triggering unit))) and do (Actions)
Boucle - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Si - Conditions
And - All (Conditions) are true
Conditions
(Owner of (Picked unit)) Egal à (Picked player) (LocalSortsUnit is alive) Egal à TRUE
Alors - Actions
Set LocalSortsPoint = (Position of LocalSortsUnit) Effet spécial - Create a special effect at LocalSortsPoint using AbilitiesSpellsItemsAIreAIreTarget.mdl Effet spécial - Destroy LocalSortsEffet Custom script: call RemoveLocation( udg_LocalSortsPoint) If ((Level of |cffffcc00F|r|cffffcc55eu stellaire|r for (Triggering unit)) Egal à 1) then do (Unité - Cause (Triggering unit) to damage LocalSortsUnit, dealing 20.00 damage of attack type Sorts and damage type Normal) else do (Do nothing) If ((Level of |cffffcc00F|r|cffffcc55eu stellaire|r for (Triggering unit)) Egal à 2) then do (Unité - Cause (Triggering unit) to damage LocalSortsUnit, dealing 40.00 damage of attack type Sorts and damage type Normal) else do (Do nothing) If ((Level of |cffffcc00F|r|cffffcc55eu stellaire|r for (Triggering unit)) Egal à 3) then do (Unité - Cause (Triggering unit) to damage LocalSortsUnit, dealing 80.00 damage of attack type Sorts and damage type Normal) else do (Do nothing) If ((Level of |cffffcc00F|r|cffffcc55eu stellaire|r for (Triggering unit)) Egal à 4) then do (Unité - Cause (Triggering unit) to damage LocalSortsUnit, dealing 160.00 damage of attack type Sorts and damage type Normal) else do (Do nothing) If ((Level of |cffffcc00F|r|cffffcc55eu stellaire|r for (Triggering unit)) Egal à 5) then do (Unité - Cause (Triggering unit) to damage LocalSortsUnit, dealing 240.00 damage of attack type Sorts and damage type Normal) else do (Do nothing) If ((Level of |cffffcc00F|r|cffffcc55eu stellaire|r for (Triggering unit)) Egal à 6) then do (Unité - Cause (Triggering unit) to damage LocalSortsUnit, dealing 380.00 damage of attack type Sorts and damage type Normal) else do (Do nothing) If ((Level of |cffffcc00F|r|cffffcc55eu stellaire|r for (Triggering unit)) Egal à 7) then do (Unité - Cause (Triggering unit) to damage LocalSortsUnit, dealing 450.00 damage of attack type Sorts and damage type Normal) else do (Do nothing) If ((Level of |cffffcc00F|r|cffffcc55eu stellaire|r for (Triggering unit)) Egal à 8) then do (Unité - Cause (Triggering unit) to damage LocalSortsUnit, dealing 510.00 damage of attack type Sorts and damage type Normal) else do (Do nothing) If ((Level of |cffffcc00F|r|cffffcc55eu stellaire|r for (Triggering unit)) Egal à 9) then do (Unité - Cause (Triggering unit) to damage LocalSortsUnit, dealing 565.00 damage of attack type Sorts and damage type Normal) else do (Do nothing) If ((Level of |cffffcc00F|r|cffffcc55eu stellaire|r for (Triggering unit)) Egal à 10) then do (Unité - Cause (Triggering unit) to damage LocalSortsUnit, dealing 640.00 damage of attack type Sorts and damage type Normal) else do (Do nothing)
Sinon - Actions
Secret:
profet a écrit:
D'ici peu le JaDK sera disponible, voici à quoi ressemblerait ton premier sort en l'utilisant
PS: tes dégats par niveau sont bizarres, ils ne sont pas proportionnels, c'est voulu?
Euh oui c'est sympathique mais j'y comprends rien .
Pour les dégats c'était voulu et pas voulu . Vous préférez quoi vous? Des dégats proportionnels ou pas?
EDIT; petite question pour pas encombrer de sujets qui ne servent à rien:
Y a-t-il plus d'id ordre de base que la liste proposée? Car quand on fait shift+entrée ou remplir automatiquement les niveaux, on peut choisir l'ordre qu'on veut .
Bon là il y a deux possibilité:
1) J'étais pas au courant et je suis très con.
2) Ca ne marche pas et je suis très con.
Inscrit le: 14 Oct 2009 Messages: 719 Sujets: 40 Spécialité en worldedit: Les bugs Médailles: 1 (En savoir plus...)
Posté le: 25/01/10 18:12 Sujet du message:
Non je ne suis pas sûr de ce que je fait mais je crois que c'est ça la technique pour les memorys leak (ici)et pour les variables locales en GUI (ici). _________________
Test Events Unit - A unit Begins channeling an ability Conditions
Actions
Set point = (Position of (Target unit of ability being cast)) Custom script: call RemoveLocation(udg_point)
Moi j'ai testé ceci. L'éditeur ne me dit rien, la partie démarre normalement. Bien sur, ce déclencheur ne sert strictement à rien, mais la structure de tes déclencheurs s'y trouve.
La variable point est une variable globale.
Edit : Ah! Non, je crois que je sais où est le problème. Tu déclares tes variables points comme ceci :
Jass:
local point udg_LocalSortsPoint
alors qu'il faudrait s'y prendre comme ceci.
Jass:
local location udg_LocalSortsPoint
. _________________
Dernière édition par louisdespi le 25/01/10 18:26; édité 1 fois
Inscrit le: 14 Oct 2009 Messages: 719 Sujets: 40 Spécialité en worldedit: Les bugs Médailles: 1 (En savoir plus...)
Posté le: 25/01/10 18:25 Sujet du message:
Ouais sauf que moi je fait le leak et la variable locale, donc il faut que je la nomme et que je laisse le udg_ devant, comme dit dans le tutorial (voir plus haut). Je ne comprend vraiment plus rien là .
Sapeur-Goblin a écrit:
EDIT; petite question pour pas encombrer de sujets qui ne servent à rien:
Y a-t-il plus d'id ordre de base que la liste proposée? Car quand on fait shift+entrée ou remplir automatiquement les niveaux, on peut choisir l'ordre qu'on veut .
Bon là il y a deux possibilité:
1) J'étais pas au courant et je suis très con.
2) Ca ne marche pas et je suis très con.
Inscrit le: 14 Oct 2009 Messages: 719 Sujets: 40 Spécialité en worldedit: Les bugs Médailles: 1 (En savoir plus...)
Posté le: 25/01/10 18:53 Sujet du message:
-MAGNIFIQUE- ça marche!
Merci . Bon bin je vais pouvoir faire mes sorts tranquillement mais j'ai rencontré un autre bug:
Dans un déclencheur il n'y a nul part une ligne qui tue ou remove une unité et j'ai la cible de mon sort qui disparaît sans animation de mort
.
Bref pas besoin de regarder ma spécialité en We pour savoir que je rencontre que des bugs.
Et pour les id ordres de bases c'est réponse 1 ou 2 ? _________________
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