Worldedit
  Worldedit
Le site sur l'éditeur de warcraft 3 !
 
  FAQFAQ   RechercherRechercher   Liste des MembresListe des Membres    Groupes d'utilisateursGroupes d'utilisateurs   medals.phpMédailles   S'enregistrerS'enregistrer 
 ProfilProfil   Se connecter pour vérifier ses messages privésSe connecter pour vérifier ses messages privés   ConnexionConnexion 
  FAQFAQ World Editor   UploadUploader une map ou une image    UploadAjouter sa map à l'annuaire   UploadConsulter l'annuaire

Ce n'est vraiment pas fait pour moi le Jass!
Aller à la page 1, 2  Suivante
 
Poster un nouveau sujet   Répondre au sujet    Worldedit Index du Forum -> Aide sur les déclencheurs
Voir le sujet précédent :: Voir le sujet suivant  
Auteur Message
 Sapeur-Goblin
Floodeur prématuré


Inscrit le: 14 Oct 2009
Messages: 719
Sujets: 40
Spécialité en worldedit: Les bugs
Médailles: 1 (En savoir plus...)
Créateur d'unité (Quantité : 1)

MessagePosté le: 24/01/10 15:42    Sujet du message: Ce n'est vraiment pas fait pour moi le Jass! Citer

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
Collapse Evénements
Unité - A unit Initie l'effet d'une compétence
Collapse Conditions
((Ability being cast) Egal à  |cffffcc00F|r|cffffcc55eu stellaire|r )
Collapse 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)
Collapse For each (Integer A) from 1 to 4, do (Actions)
Collapse Boucle - Actions
Custom script:   set bj_wantDestroyGroup = true
Collapse Groupe unité - Pick every unit in (Units within 512.00 of (Position of LocalSortsUnit)) and do (Actions)
Collapse Boucle - Actions
Wait 3.00 seconds
Collapse Groupe joueur - Pick every player in (All enemies of (Owner of (Triggering unit))) and do (Actions)
Collapse Boucle - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse Si - Conditions
And - All (Conditions) are true
Collapse Conditions
(Owner of (Picked unit)) Egal à  (Picked player)
(LocalSortsUnit is alive) Egal à  TRUE
Collapse 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)
Collapse Sinon - Actions



Et voilà un début de 2ème sort:
Secret:

Gui:
Trigger:
Foret dechainee
Collapse Evénements
Unité - A unit Initie l'effet d'une compétence
Collapse Conditions
((Ability being cast) Egal à  |cffffcc00F|r|cffffcc55orêt déchaînée|r )
Collapse 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".
_________________
Revenir en haut
Voir le profil de l'utilisateur Envoyer un message privé
 Crowolf
Animateur


Inscrit le: 21 Avr 2008
Messages: 1607
Sujets: 81
Spécialité en worldedit: Utiliser le travail des autres
Médailles: 3 (En savoir plus...)
Rédacteur de tuto #3 (Quantité : 1) Grand décorateur (Quantité : 2)

MessagePosté le: 24/01/10 16:06    Sujet du message: Citer

Je pense que c'est ça:
Dans le premier, LocalSortEffet n'est pas déclaré. Et en plus, tu ne stock pas l'effet dedans avant d'ordonner de le détruire.

Dans le deuxième, tu as un wait avant la déclaration des variables.

[edit] et c'est pas du jass ^^
_________________
Revenir en haut
Voir le profil de l'utilisateur Envoyer un message privé
 Sapeur-Goblin
Floodeur prématuré


Inscrit le: 14 Oct 2009
Messages: 719
Sujets: 40
Spécialité en worldedit: Les bugs
Médailles: 1 (En savoir plus...)
Créateur d'unité (Quantité : 1)

MessagePosté le: 24/01/10 16:19    Sujet du message: Citer

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é! Crying or Very sad
Secret:

Gui:
Trigger:
Foret dechainee
Collapse Evénements
Unité - A unit Initie l'effet d'une compétence
Collapse 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)))
Collapse 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)


_________________
Revenir en haut
Voir le profil de l'utilisateur Envoyer un message privé
 Wilfweed
Floodeur prématuré


Inscrit le: 27 Aoû 2009
Messages: 646
Sujets: 16
Spécialité en worldedit: GUI


MessagePosté le: 24/01/10 22:17    Sujet du message: Citer

local point sert à rien non ?
J'utilise seulement les customs scripts pour remove les points c'est tout.
_________________
Revenir en haut
Voir le profil de l'utilisateur Envoyer un message privé MSN Messenger
 louisdespi
Floodeur prématuré


Inscrit le: 21 Oct 2007
Messages: 437
Sujets: 70



MessagePosté le: 24/01/10 22:40    Sujet du message: Citer

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

_________________
Revenir en haut
Voir le profil de l'utilisateur Envoyer un message privé
 profet
Instanton Gravitationnel Singulier


Inscrit le: 21 Aoû 2007
Messages: 1633
Sujets: 53
Spécialité en worldedit: Pain d'épice multitâche (terrain, scripts, textures, modèles...)
Médailles: 2 (En savoir plus...)
Rédacteur de tuto #3 (Quantité : 1) Profet (Quantité : 1)

MessagePosté le: 24/01/10 22:57    Sujet du message: Citer

D'ici peu le JaDK sera disponible, voici à quoi ressemblerait ton premier sort en l'utilisant Wink

Jass:
library AbilityStellarFire uses JCast, JDamage
//***************************************************************************************************
//*  AbilityStellarFire
//***************************************************************************************************
   
    private struct spell extends IJCast
    //--- Ability Rawcode -------------------------------------------
        private static constant integer AbilityId = 'A000'
    //---------------------------------------------------------------
       
        method GetChannelTime takes nothing returns real
            return 4.
        endmethod
       
        method GetChannelTickTime takes nothing returns real
            return 1.
        endmethod
       
    //---------------------------------------------------------------
       
        private method getDamage takes nothing returns real
            if (GetLevel() == 1) then
                return 15.
            elseif (GetLevel() == 2) then
                return 30.
            elseif (GetLevel() == 3) then
                return 60.
            elseif (GetLevel() == 4) then
                return 120.
            elseif (GetLevel() == 5) then
                return 200.
            elseif (GetLevel() == 6) then
                return 300.
            elseif (GetLevel() == 7) then
                return 375.
            elseif (GetLevel() == 8) then
                return 450.
            elseif (GetLevel() == 9) then
                return 520.
            elseif (GetLevel() == 10) then
                return 600.
            endif
            return 0.
        endmethod
       
        method OnChannelTick takes nothing returns nothing
            call DestroyEffect( AddSpecialEffectTarget( "Abilities\\Spells\\Items\\AIre\\AIreTarget.mdl", GetTargetUnit(), "origin" ) )
            call JDamage_Target( GetCaster(), GetTargetUnit(), getDamage(), CUSTOM_DAMAGE_TYPE_MAGIC )
        endmethod
       
        method OnCastEffect takes nothing returns nothing
            call DestroyEffect( AddSpecialEffectTarget( "Abilities\\Spells\\Items\\AIre\\AIreTarget.mdl", GetTargetUnit(), "origin" ) )
            call JDamage_Target( GetCaster(), GetTargetUnit(), getDamage(), CUSTOM_DAMAGE_TYPE_MAGIC )
        endmethod
           
    //--- Core Implementation ---------------------------------------
        implement JCastModule
    endstruct
   
   
endlibrary

Sympathique n'est-ce pas? Smile

PS: tes dégats par niveau sont bizarres, ils ne sont pas proportionnels, c'est voulu? Neutral
_________________

Bêta Systems: 70%
Bêta Spells: 13%
Bêta Arts & graphics: 70%
Revenir en haut
Voir le profil de l'utilisateur Envoyer un message privé Visiter le site web du posteur
 Sapeur-Goblin
Floodeur prématuré


Inscrit le: 14 Oct 2009
Messages: 719
Sujets: 40
Spécialité en worldedit: Les bugs
Médailles: 1 (En savoir plus...)
Créateur d'unité (Quantité : 1)

MessagePosté le: 25/01/10 17:46    Sujet du message: Citer

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_ Confused .
Je vais essayer mais bon...

Voilà le nouveau déclencheur mais ça marche pas Crying or Very sad .
Secret:

Gui:
Trigger:
Feu stellaire
Collapse Evénements
Unité - A unit Initie l'effet d'une compétence
Collapse Conditions
((Ability being cast) Egal à  |cffffcc00F|r|cffffcc55eu stellaire|r ) and ((Unit-type of (Triggering unit)) Egal à  (Unit-type of (Triggering unit)))
Collapse 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)
Collapse For each (Integer A) from 1 to 4, do (Actions)
Collapse Boucle - Actions
Custom script:   set bj_wantDestroyGroup = true
Collapse Groupe unité - Pick every unit in (Units within 512.00 of (Position of LocalSortsUnit)) and do (Actions)
Collapse Boucle - Actions
Wait 3.00 seconds
Collapse Groupe joueur - Pick every player in (All enemies of (Owner of (Triggering unit))) and do (Actions)
Collapse Boucle - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse Si - Conditions
And - All (Conditions) are true
Collapse Conditions
(Owner of (Picked unit)) Egal à  (Picked player)
(LocalSortsUnit is alive) Egal à  TRUE
Collapse 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)
Collapse Sinon - Actions




Secret:

profet a écrit:
D'ici peu le JaDK sera disponible, voici à quoi ressemblerait ton premier sort en l'utilisant Wink

Jass:
library AbilityStellarFire uses JCast, JDamage
//***************************************************************************************************
//*  AbilityStellarFire
//***************************************************************************************************
   
    private struct spell extends IJCast
    //--- Ability Rawcode -------------------------------------------
        private static constant integer AbilityId = 'A000'
    //---------------------------------------------------------------
       
        method GetChannelTime takes nothing returns real
            return 4.
        endmethod
       
        method GetChannelTickTime takes nothing returns real
            return 1.
        endmethod
       
    //---------------------------------------------------------------
       
        private method getDamage takes nothing returns real
            if (GetLevel() == 1) then
                return 15.
            elseif (GetLevel() == 2) then
                return 30.
            elseif (GetLevel() == 3) then
                return 60.
            elseif (GetLevel() == 4) then
                return 120.
            elseif (GetLevel() == 5) then
                return 200.
            elseif (GetLevel() == 6) then
                return 300.
            elseif (GetLevel() == 7) then
                return 375.
            elseif (GetLevel() == 8) then
                return 450.
            elseif (GetLevel() == 9) then
                return 520.
            elseif (GetLevel() == 10) then
                return 600.
            endif
            return 0.
        endmethod
       
        method OnChannelTick takes nothing returns nothing
            call DestroyEffect( AddSpecialEffectTarget( "Abilities\\Spells\\Items\\AIre\\AIreTarget.mdl", GetTargetUnit(), "origin" ) )
            call JDamage_Target( GetCaster(), GetTargetUnit(), getDamage(), CUSTOM_DAMAGE_TYPE_MAGIC )
        endmethod
       
        method OnCastEffect takes nothing returns nothing
            call DestroyEffect( AddSpecialEffectTarget( "Abilities\\Spells\\Items\\AIre\\AIreTarget.mdl", GetTargetUnit(), "origin" ) )
            call JDamage_Target( GetCaster(), GetTargetUnit(), getDamage(), CUSTOM_DAMAGE_TYPE_MAGIC )
        endmethod
           
    //--- Core Implementation ---------------------------------------
        implement JCastModule
    endstruct
   
   
endlibrary

Sympathique n'est-ce pas? Smile

PS: tes dégats par niveau sont bizarres, ils ne sont pas proportionnels, c'est voulu? Neutral



Euh oui c'est sympathique mais j'y comprends rien Wink .

Pour les dégats c'était voulu et pas voulu Neutral. 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 Surprised .
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.

Réponse 1 ou 2?
_________________
Revenir en haut
Voir le profil de l'utilisateur Envoyer un message privé
 louisdespi
Floodeur prématuré


Inscrit le: 21 Oct 2007
Messages: 437
Sujets: 70



MessagePosté le: 25/01/10 18:06    Sujet du message: Citer

En fait, je ne comprend pas bien pourquoi tu déclares ces 2 variables en locales? Est-ce fondé? Ou tu n'es pas exactement sur de ce que tu fait?

Edit : Ne serais-ce pas mieux de faire un return unique en utilisant les donnée niveaux?

Jass:
return GetLevel() * 100

_________________
Revenir en haut
Voir le profil de l'utilisateur Envoyer un message privé
 Sapeur-Goblin
Floodeur prématuré


Inscrit le: 14 Oct 2009
Messages: 719
Sujets: 40
Spécialité en worldedit: Les bugs
Médailles: 1 (En savoir plus...)
Créateur d'unité (Quantité : 1)

MessagePosté le: 25/01/10 18:12    Sujet du message: Citer

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).
_________________
Revenir en haut
Voir le profil de l'utilisateur Envoyer un message privé
 louisdespi
Floodeur prématuré


Inscrit le: 21 Oct 2007
Messages: 437
Sujets: 70



MessagePosté le: 25/01/10 18:20    Sujet du message: Citer

Gui:
Trigger:
Test
Events
Unit - A unit Begins channeling an ability
Conditions
Collapse 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
Revenir en haut
Voir le profil de l'utilisateur Envoyer un message privé
 Sapeur-Goblin
Floodeur prématuré


Inscrit le: 14 Oct 2009
Messages: 719
Sujets: 40
Spécialité en worldedit: Les bugs
Médailles: 1 (En savoir plus...)
Créateur d'unité (Quantité : 1)

MessagePosté le: 25/01/10 18:25    Sujet du message: Citer

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à Confused .

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.

Réponse 1 ou 2?

Tu as une idée pour ça?
_________________
Revenir en haut
Voir le profil de l'utilisateur Envoyer un message privé
 Troll-Brain
Ri1kamoua


Inscrit le: 23 Aoû 2007
Messages: 7146
Sujets: 147
Spécialité en worldedit: le troll, le flood, la vulgarité, mon coeur balance
Médailles: 2 (En savoir plus...)
Rédacteur de tuto #3 (Quantité : 1) Grand mage créateur de sort (Quantité : 1)

MessagePosté le: 25/01/10 18:35    Sujet du message: Citer

Si ces tutos ne sont pas approuvés c'est qu'il y a une raison.
Un motivé pour les mettre à jour ?
_________________
Le violet, c'est moche.
Revenir en haut
Voir le profil de l'utilisateur Envoyer un message privé
 louisdespi
Floodeur prématuré


Inscrit le: 21 Oct 2007
Messages: 437
Sujets: 70



MessagePosté le: 25/01/10 18:47    Sujet du message: Citer

@Troll : je ne m'y connais pas assez pour me lancer dans la réactualisation d'un tutoriel sur le sujet.

@Sapeur-Goblin : Alors? Ca fonction maintenant?

Citation:
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
.

_________________
Revenir en haut
Voir le profil de l'utilisateur Envoyer un message privé
 Sapeur-Goblin
Floodeur prématuré


Inscrit le: 14 Oct 2009
Messages: 719
Sujets: 40
Spécialité en worldedit: Les bugs
Médailles: 1 (En savoir plus...)
Créateur d'unité (Quantité : 1)

MessagePosté le: 25/01/10 18:53    Sujet du message: Citer

-MAGNIFIQUE- ça marche!
Merci Smile . 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
Surprised.
Bref pas besoin de regarder ma spécialité en We pour savoir que je rencontre que des bugs. Crying or Very sad

Et pour les id ordres de bases c'est réponse 1 ou 2 Very Happy ?
_________________
Revenir en haut
Voir le profil de l'utilisateur Envoyer un message privé
 louisdespi
Floodeur prématuré


Inscrit le: 21 Oct 2007
Messages: 437
Sujets: 70



MessagePosté le: 25/01/10 19:12    Sujet du message: Citer

Citation:
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


Tu pourrais nous montrer ton déclencheur?

Citation:
Et pour les id ordres de bases c'est réponse 1 ou 2 ?


Je ne sais pas.
_________________
Revenir en haut
Voir le profil de l'utilisateur Envoyer un message privé
Montrer les messages depuis:   
Poster un nouveau sujet   Répondre au sujet    Worldedit Index du Forum -> Aide sur les déclencheurs Toutes les heures sont au format GMT + 1 Heure
Aller à la page 1, 2  Suivante
Page 1 sur 2
La question posée dans ce topic a été résolue !

 
Sauter vers:  
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


Powered by phpBB © 2001, 2005 phpBB Group
Traduction par : phpBB-fr.com