• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Why aren't these 2 abilities working??

Status
Not open for further replies.
Level 14
Joined
Jul 19, 2007
Messages
770
I've copied 2 abilities from a spellpack into one of my maps and I know I've copied all triggers needed for it and all abilities, buffs and dummies required and the abilities aren't getting any error while saving the map. I've just edited the name of the 2 abilities but they work the same way and I haven't edited anything else than just the ability names and some special effects it creates for it but rest should be the same but still they aren't working :-/ I can't see what's wrong. When I'm casting the 2 abilities they actually starts making the effects of it but then just stops immediately :-/ So what could actually be wrong? I can't see anything missing for them and I know I have copied all triggers needed for them and all abilities, buffs and dummies required.. The triggers of the 2 abilties are these ones under..

These triggers are required for both of the abilities..
  • Initialization
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set PowerChainHash = (Last created hashtable)
      • Trigger - Run Abilities <gen> (ignoring conditions)
  • GUI SpellEvent
    • Events
    • Conditions
    • Actions
      • Custom script: local integer i = 0
      • -------- - --------
      • Custom script: call ExecuteFunc("InitSpellEvent")
      • -------- - --------
      • Hashtable - Create a hashtable
      • Set SpellEventHash = (Last created hashtable)
      • -------- - --------
      • Custom script: loop
      • Custom script: exitwhen udg_SpellEventAbility[i] == 0
      • Custom script: call SaveTriggerHandle(udg_SpellEventHash, udg_SpellEventAbility[i], 0, udg_SpellEventTrigger[i])
      • Custom script: set i = i + 1
      • Custom script: endloop
      • Custom script: endfunction
      • -------- - --------
      • Custom script: function OnSpell takes nothing returns boolean
      • Custom script: local trigger t = LoadTriggerHandle(udg_SpellEventHash, GetSpellAbilityId(), 0)
      • -------- - --------
      • Custom script: call TriggerExecute(t)
      • -------- - --------
      • Custom script: set t = null
      • Custom script: return false
      • Custom script: endfunction
      • -------- - --------
      • Custom script: function InitSpellEvent takes nothing returns nothing
      • Custom script: local trigger t = CreateTrigger()
      • Custom script: call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT)
      • Custom script: call TriggerAddCondition(t, Condition(function OnSpell))
      • Custom script: set t = null
  • Abilities
    • Events
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set sorHashOrb = (Last created hashtable)
      • Set SpellEventAbility[0] = Moon Spiral Heart Attack
      • Set SpellEventTrigger[0] = Orb Cast <gen>
      • Hashtable - Create a hashtable
      • Set sorHashWither = (Last created hashtable)
      • Set SpellEventAbility[1] = Shine Aqua Illusion
      • Set SpellEventTrigger[1] = Shine Aqua Illusion Cast <gen>
      • -------- - --------
      • Trigger - Run GUI SpellEvent <gen> (ignoring conditions)
      • -------- - --------
      • Custom script: call DestroyTrigger(GetTriggeringTrigger())
Here is the triggers of the first ability..
  • Orb Cast
    • Events
    • Conditions
    • Actions
      • Set tempUnit0 = (Casting unit)
      • Set tempPlayer = (Owner of tempUnit0)
      • Set tempInteger0 = (Hero level of tempUnit0)
      • Set tempLoc0 = (Position of tempUnit0)
      • Set tempLoc1 = (Target point of ability being cast)
      • Set tempReal0 = (Angle from tempLoc0 to tempLoc1)
      • Custom script: call RemoveLocation(udg_tempLoc1)
      • Custom script: set udg_tempLoc1 = null
      • Set tempLoc2 = (tempLoc0 offset by sorOrbSpeed towards tempReal0 degrees)
      • Custom script: call RemoveLocation(udg_tempLoc0)
      • Custom script: set udg_tempLoc0 = null
      • Unit - Create 1 Moon Spiral Heart Attack (Missile) for tempPlayer at tempLoc2 facing tempReal0 degrees
      • Custom script: call RemoveLocation(udg_tempLoc2)
      • Custom script: set udg_tempLoc2 = null
      • Unit Group - Add (Last created unit) to sorOrbGroup
      • Set sorCountOrb = (sorCountOrb + 1)
      • Set tempInteger1 = (Key (Last created unit))
      • Hashtable - Save Handle OftempUnit0 as (Key source) of tempInteger1 in sorHashOrb
      • Hashtable - Save tempInteger0 as (Key level) of tempInteger1 in sorHashOrb
      • Hashtable - Save tempReal0 as (Key angle) of tempInteger1 in sorHashOrb
      • Hashtable - Save tempReal0 as (Key spin) of tempInteger1 in sorHashOrb
      • Hashtable - Save 0.00 as (Key distance) of tempInteger1 in sorHashOrb
      • Hashtable - Save 0 as (Key shardtimer) of tempInteger1 in sorHashOrb
      • Hashtable - Save False as (Key exp) of tempInteger1 in sorHashOrb
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Orb Missile <gen> is on) Equal to False
        • Then - Actions
          • Trigger - Turn on Orb Missile <gen>
        • Else - Actions
  • Orb Missile
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • sorCountOrb Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
          • Unit Group - Pick every unit in sorOrbGroup and do (Actions)
            • Loop - Actions
              • Set tempUnit0 = (Picked unit)
              • Custom script: set udg_tempInteger0 = GetHandleId(udg_tempUnit0)
              • Set tempReal0 = (Load (Key distance) of tempInteger0 from sorHashOrb)
              • Set tempReal1 = (Load (Key angle) of tempInteger0 from sorHashOrb)
              • Set tempLoc0 = (Position of tempUnit0)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • tempReal0 Greater than or equal to sorOrbRange
                • Then - Actions
                  • Unit Group - Remove tempUnit0 from sorOrbGroup
                  • Unit - Kill tempUnit0
                  • Set sorCountOrb = (sorCountOrb - 1)
                  • -------- - --------
                  • -------- - --------
                  • Hashtable - Clear all child hashtables of child tempInteger0 in sorHashOrb
                • Else - Actions
                  • Set tempPlayer = (Owner of tempUnit0)
                  • Set tempLoc1 = (tempLoc0 offset by sorOrbSpeed towards tempReal1 degrees)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Load (Key exp) of tempInteger0 from sorHashOrb) Equal to False
                    • Then - Actions
                      • Set tempGroup = (Units within sorOrbRadius of tempLoc0 matching ((((Matching unit) belongs to an enemy of tempPlayer) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is Magic Immune) Equal to False) and (((Matching unit) is A structure)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (tempGroup is empty) Equal to False
                        • Then - Actions
                          • Hashtable - Save True as (Key exp) of tempInteger0 in sorHashOrb
                          • Hero - Add 1 experience to (Load (Key source) of tempInteger0 in sorHashOrb), Show level-up graphics
                        • Else - Actions
                      • Unit Group - Remove all units from tempGroup
                      • Custom script: call DestroyGroup(udg_tempGroup)
                    • Else - Actions
                  • Unit - Move tempUnit0 instantly to tempLoc1
                  • Custom script: call RemoveLocation(udg_tempLoc1)
                  • Custom script: set udg_tempLoc1 = null
                  • -------- - --------
                  • Set tempInteger2 = (Load (Key shardtimer) of tempInteger0 from sorHashOrb)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • tempInteger2 Equal to 0
                    • Then - Actions
                      • Set tempUnit1 = (Load (Key source) of tempInteger0 in sorHashOrb)
                      • Hashtable - Save 2 as (Key shardtimer) of tempInteger0 in sorHashOrb
                      • Set tempReal1 = (Load (Key spin) of tempInteger0 from sorHashOrb)
                      • Hashtable - Save (tempReal1 + sorOrbSpin) as (Key spin) of tempInteger0 in sorHashOrb
                      • For each (Integer A) from 0 to 3, do (Actions)
                        • Loop - Actions
                          • Set tempReal1 = (tempReal1 + (90.00 x (Real((Integer A)))))
                          • Set tempLoc1 = (tempLoc0 offset by (0.50 x sorOrbCollision) towards tempReal1 degrees)
                          • Unit - Create 1 Moon Spiral Heart Attack (Hearts) for tempPlayer at tempLoc1 facing tempReal1 degrees
                          • Custom script: call RemoveLocation(udg_tempLoc1)
                          • Custom script: set udg_tempLoc1 = null
                          • Unit Group - Add (Last created unit) to sorOrbShardGroup
                          • Set sorCountShard = (sorCountShard + 1)
                          • Set tempInteger1 = (Key (Last created unit))
                          • Hashtable - Save Handle OftempUnit1 as (Key source) of tempInteger1 in sorHashOrb
                          • Hashtable - Save (Load (Key level) of tempInteger0 from sorHashOrb) as (Key level) of tempInteger1 in sorHashOrb
                          • Hashtable - Save tempReal1 as (Key angle) of tempInteger1 in sorHashOrb
                          • Hashtable - Save 0.00 as (Key distance) of tempInteger1 in sorHashOrb
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Heart Missile <gen> is on) Equal to False
                            • Then - Actions
                              • Trigger - Turn on Heart Missile <gen>
                            • Else - Actions
                    • Else - Actions
                      • Hashtable - Save (tempInteger2 - 1) as (Key shardtimer) of tempInteger0 in sorHashOrb
                  • -------- - --------
                  • Hashtable - Save (tempReal0 + sorOrbSpeed) as (Key distance) of tempInteger0 in sorHashOrb
              • Custom script: call RemoveLocation(udg_tempLoc0)
              • Custom script: set udg_tempLoc0 = null
  • Heart Missile
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • sorCountShard Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
          • Unit Group - Pick every unit in sorOrbShardGroup and do (Actions)
            • Loop - Actions
              • Set tempUnit0 = (Picked unit)
              • Set tempPlayer = (Owner of tempUnit0)
              • Custom script: set udg_tempInteger0 = GetHandleId(udg_tempUnit0)
              • Set tempReal0 = (Load (Key distance) of tempInteger0 from sorHashOrb)
              • Set tempLoc0 = (Position of tempUnit0)
              • Set tempGroup = (Units within sorOrbCollision of tempLoc0 matching ((((Matching unit) belongs to an enemy of tempPlayer) Equal to True) and ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is Magic Immune) Equal to False) and (((Matching unit) is A structur
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • (tempGroup is empty) Equal to False
                      • tempReal0 Greater than or equal to sorOrbRadius
                • Then - Actions
                  • Unit Group - Remove tempUnit0 from sorOrbShardGroup
                  • Unit - Kill tempUnit0
                  • Set sorCountShard = (sorCountShard - 1)
                  • -------- - --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (tempGroup is empty) Equal to False
                    • Then - Actions
                      • Set tempReal1 = sorOrbCollision
                      • Unit Group - Pick every unit in tempGroup and do (Actions)
                        • Loop - Actions
                          • Set tempUnit1 = (Picked unit)
                          • Set tempLoc1 = (Position of tempUnit1)
                          • Set tempReal2 = (Distance between tempLoc0 and tempLoc1)
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • tempReal2 Less than tempReal1
                            • Then - Actions
                              • Set tempReal1 = tempReal2
                              • Set tempUnit2 = tempUnit1
                            • Else - Actions
                          • Unit Group - Remove tempUnit1 from tempGroup
                      • Custom script: call DestroyGroup(udg_tempGroup)
                      • Set tempUnit3 = (Load (Key source) of tempInteger0 in sorHashOrb)
                      • Set tempReal3 = (sorOrbDmgBase + (sorOrbDmgLFactor x (Real(((Load (Key level) of tempInteger0 from sorHashOrb) - 1)))))
                      • Unit - Cause tempUnit3 to damage tempUnit2, dealing tempReal3 damage of attack type Spells and damage type Magic
                      • Special Effect - Create a special effect attached to the chest of tempUnit2 using Abilities\Spells\Items\AIil\AIilTarget.mdl
                      • Special Effect - Destroy (Last created special effect)
                    • Else - Actions
                  • -------- - --------
                  • Hashtable - Clear all child hashtables of child tempInteger0 in sorHashOrb
                • Else - Actions
                  • Set tempReal1 = (Load (Key angle) of tempInteger0 from sorHashOrb)
                  • Set tempLoc1 = (tempLoc0 offset by (0.50 x sorOrbCollision) towards tempReal1 degrees)
                  • Unit - Move tempUnit0 instantly to tempLoc1
                  • Custom script: call RemoveLocation(udg_tempLoc1)
                  • Custom script: set udg_tempLoc1 = null
                  • Hashtable - Save (tempReal0 + (0.50 x sorOrbCollision)) as (Key distance) of tempInteger0 in sorHashOrb
              • Custom script: call RemoveLocation(udg_tempLoc0)
              • Custom script: set udg_tempLoc0 = null
And here is the triggers for the second ability..
  • Shine Aqua Illusion Cast
    • Events
    • Conditions
    • Actions
      • Custom script: local unit c = GetSpellAbilityUnit()
      • Custom script: local unit t = GetSpellTargetUnit()
      • Custom script: local real x0 = GetUnitX(c)
      • Custom script: local real y0 = GetUnitY(c)
      • Custom script: local real x1 = GetUnitX(t)
      • Custom script: local real y1 = GetUnitY(t)
      • Custom script: local location l0 = GetUnitLoc(c)
      • Custom script: local location l1 = GetUnitLoc(t)
      • Custom script: local real z0 = GetLocationZ(l0) + GetUnitFlyHeight(c) + udg_sorWitherLightZ
      • Custom script: local real z1 = GetLocationZ(l1) + GetUnitFlyHeight(t) + udg_sorWitherLightZ
      • Custom script: call RemoveLocation(l1)
      • Custom script: set l1 = null
      • Custom script: set udg_tempUnit0 = c
      • Custom script: set udg_tempInteger0 = GetHandleId(udg_tempUnit0)
      • Custom script: set udg_tempUnit1 = t
      • Custom script: set udg_tempInteger1 = GetHandleId(udg_tempUnit1)
      • Set tempPlayer = (Owner of tempUnit0)
      • Unit Group - Add tempUnit0 to sorWitherCasters
      • Set sorCountWither = (sorCountWither + 1)
      • Custom script: call CreateNUnitsAtLoc(1, 'h025', udg_tempPlayer, l0, bj_UNIT_FACING)
      • Custom script: call RemoveLocation(l0)
      • Custom script: set l0 = null
      • Set tempUnit2 = (Last created unit)
      • Unit - Set level of Shine Aqua Illusion (Slow) for tempUnit2 to (Hero level of tempUnit0)
      • Hashtable - Save Handle OftempUnit2 as (Key buff0) of tempInteger0 in sorHashWither
      • Hashtable - Save Handle OftempUnit1 as (Key target) of tempInteger0 in sorHashWither
      • Hashtable - Save (sorWitherDamageBase x intervalAbilityProjectile) as (Key dpt) of tempInteger0 in sorHashWither
      • Custom script: set udg_tempLight = AddLightningEx("DRAM", true, x0, y0, z0, x1, y1, z1)
      • Hashtable - Save Handle OftempLight as (Key light) of tempInteger0 in sorHashWither
      • Lightning - Change color of tempLight to (0.40 0.60 1.00) with 1.00 alpha
      • Hashtable - Save 0 as (Key effecttimer) of tempInteger0 in sorHashWither
      • Hero - Add 1 experience to tempUnit0, Show level-up graphics
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Shine Aqua Illusion Effects <gen> is on) Equal to False
        • Then - Actions
          • Trigger - Turn on Shine Aqua Illusion Effects <gen>
        • Else - Actions
  • Shine Aqua Illusion Effects
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • sorCountWither Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions
          • Unit Group - Pick every unit in sorWitherCasters and do (Actions)
            • Loop - Actions
              • Set tempUnit0 = (Picked unit)
              • Custom script: set udg_tempInteger0 = GetHandleId(udg_tempUnit0)
              • Set tempLight = (Load (Key light) of tempInteger0 in sorHashWither)
              • Set tempUnit1 = (Load (Key buff0) of tempInteger0 in sorHashWither)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Current order of tempUnit0) Not equal to (Order(drain))
                • Then - Actions
                  • Unit Group - Remove tempUnit0 from sorWitherCasters
                  • Set sorCountWither = (sorCountWither - 1)
                  • Unit - Remove tempUnit1 from the game
                  • Lightning - Destroy tempLight
                  • Hashtable - Clear all child hashtables of child tempInteger0 in sorHashWither
                • Else - Actions
                  • Set tempLoc0 = (Position of tempUnit0)
                  • Set tempUnit2 = (Load (Key target) of tempInteger0 in sorHashWither)
                  • Set tempLoc1 = (Position of tempUnit2)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • ((tempUnit2 is dead) Equal to True) or ((Distance between tempLoc0 and tempLoc1) Greater than sorWitherRangeMax)
                    • Then - Actions
                      • Unit - Order tempUnit0 to Stop
                    • Else - Actions
                      • Custom script: set udg_tempReal0 = GetLocationZ(udg_tempLoc0) + GetUnitFlyHeight(udg_tempUnit0) + udg_sorWitherLightZ
                      • Custom script: set udg_tempReal1 = GetLocationZ(udg_tempLoc1) + GetUnitFlyHeight(udg_tempUnit2) + udg_sorWitherLightZ
                      • Custom script: call MoveLightningEx(udg_tempLight, true, GetLocationX(udg_tempLoc0), GetLocationY(udg_tempLoc0), udg_tempReal0, GetLocationX(udg_tempLoc1), GetLocationY(udg_tempLoc1), udg_tempReal1)
                      • Custom script: call RemoveLocation(udg_tempLoc0)
                      • Custom script: set udg_tempLoc0 = null
                      • Custom script: call RemoveLocation(udg_tempLoc1)
                      • Custom script: set udg_tempLoc1 = null
                      • Set tempReal0 = (Load (Key dpt) of tempInteger0 from sorHashWither)
                      • Unit - Cause tempUnit0 to damage tempUnit2, dealing tempReal0 damage of attack type Spells and damage type Magic
                      • Set tempInteger1 = (Load (Key effecttimer) of tempInteger0 from sorHashWither)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • tempInteger1 Equal to 0
                        • Then - Actions
                          • Unit - Order tempUnit1 to Human Sorceress - Slow tempUnit2
                          • Hashtable - Save 4 as (Key effecttimer) of tempInteger0 in sorHashWither
                        • Else - Actions
                          • Hashtable - Save (tempInteger1 - 1) as (Key effecttimer) of tempInteger0 in sorHashWither
I hope someone can help me because I can't figure out myself why they aren't working :-/
 
Level 25
Joined
Sep 26, 2009
Messages
2,378
I'm not that good with jass, but... didn't you modify the GUI Spell Event trigger?

You declare local integer variable and next you run a function. However the function never ends because there is no "endfunction" statement. Actually, the endfunction is after endloop statement, which doesn't make much sense imo.

Let's say you fix that and currently, the trigger is executing the InitSpellEvent function. It gets to the line: "call TriggerAddCondition(t, Condition(function OnSpell))".
As I understand however, this "OnSpell" function shouldn't work, because it loads the trigger from "SpellEventHash" hashtable - that hasthable, however is not yet created!
As it is right now, the hasthable and the following loop sequence should be executed after InitSpellEvent function has finished executing (and that function ends after OnSpell function has been executed).

Summing it up, as I understand it the current execution of actions is as follows:
1) local integer i = 0
2) execute InitSpellEvent function
3) create trigger t's event
4) execute OnSpell function
5) load trigger from SpellEventHash
6) call TriggerExecute()
7) create SpellEventHash
8) Loop - Fill SpellEventHash with triggers

Do you see the problem?


Edit:
Also, I see you use numerous variables in your conditions, but I don't see where you set values for those variables - e.g. sorOrbRange. If their values are set through variable editor, then be sure correct values are set there.
 
Last edited:
Level 14
Joined
Jul 19, 2007
Messages
770
I'm not that good with jass, but... didn't you modify the GUI Spell Event trigger?

You declare local integer variable and next you run a function. However the function never ends because there is no "endfunction" statement. Actually, the endfunction is after endloop statement, which doesn't make much sense imo.

Let's say you fix that and currently, the trigger is executing the InitSpellEvent function. It gets to the line: "call TriggerAddCondition(t, Condition(function OnSpell))".
As I understand however, this "OnSpell" function shouldn't work, because it loads the trigger from "SpellEventHash" hashtable - that hasthable, however is not yet created!
As it is right now, the hasthable and the following loop sequence should be executed after InitSpellEvent function has finished executing (and that function ends after OnSpell function has been executed).

Summing it up, as I understand it the current execution of actions is as follows:
1) local integer i = 0
2) execute InitSpellEvent function
3) create trigger t's event
4) execute OnSpell function
5) load trigger from SpellEventHash
6) call TriggerExecute()
7) create SpellEventHash
8) Loop - Fill SpellEventHash with triggers

Do you see the problem?


Edit:
Also, I see you use numerous variables in your conditions, but I don't see where you set values for those variables - e.g. sorOrbRange. If their values are set through variable editor, then be sure correct values are set there.
Hmm not really.. I'm so lost at triggering :( I don't really get why these triggers aren't working because I have imported everything that is required for the 2 abilties to be working and still they aren't working but they work perfect in the original spellpack map that I imported them from..
 
Level 25
Joined
Sep 26, 2009
Messages
2,378
Hmmm I see. I thought you made those triggers. If it's downloaded from somewhere else, did you completely follow import instructions?
The only other thing is that it may be related to spell's raw code name which basically changes from map to map. Such a thing should be specified in the instructions though.
You could also try to import the spell into some empty map - everything from the pack. Then for example try to remove some (not all) spells that you think you may not need and check if the spells you want still work. If they don't, then one of the triggers you deleted was probably vital for the spell pack.

Also, as I wrote in my previous post, check the values set for variables like sorOrbRange in variable editor, because you didn't post any trigger where those would be set and if they have their default value (e.g. 0.00 for sorOrbRange), then it would make sense that those spell won't work for you.
 
Level 14
Joined
Jul 19, 2007
Messages
770
Hmmm I see. I thought you made those triggers. If it's downloaded from somewhere else, did you completely follow import instructions?
The only other thing is that it may be related to spell's raw code name which basically changes from map to map. Such a thing should be specified in the instructions though.
You could also try to import the spell into some empty map - everything from the pack. Then for example try to remove some (not all) spells that you think you may not need and check if the spells you want still work. If they don't, then one of the triggers you deleted was probably vital for the spell pack.

Also, as I wrote in my previous post, check the values set for variables like sorOrbRange in variable editor, because you didn't post any trigger where those would be set and if they have their default value (e.g. 0.00 for sorOrbRange), then it would make sense that those spell won't work for you.
Aaah! There it is :D It was the values who caused the problem because they where not set in any number :eek: but why? Shouldn't they be automatically set to the same as from the map you copied it from?
 
Level 25
Joined
Sep 26, 2009
Messages
2,378
Both spells add 1 experience to the caster when used. If you (don't) want it is up to you. Removing it should have no effect on those spells.
Is it really from a spell pack or are those spells taken from some other map? The whole thing seems to be way too focused as final implementation for some map rather than spell pack made and uploaded for other users (and talk about efficiency... I for example don't understand the need to make spells without events and conditions and then at map ini create via jass a local trigger that adds those events and conditions to those spell; or using local unit variable c, assign to it the (casting unit) and then assing the local variable c to global variable tempUnit0).

So to answer if there are any things that are needed or not - I don't really know. Many parts use jass which I'm not that proficient with (tho I mostly do understand what it does and how it works, I lack the actual experience) but then those jass parts are also used in (imo) such complicated and totally inefficient way that I'm afraid to really touch the script because I could mess something up (that it works in the original map is a wonder to me - that shows that either something is amiss or that I really do lack the true understanding of jass)
 
Level 14
Joined
Jul 19, 2007
Messages
770
Both spells add 1 experience to the caster when used. If you (don't) want it is up to you. Removing it should have no effect on those spells.
Is it really from a spell pack or are those spells taken from some other map? The whole thing seems to be way too focused as final implementation for some map rather than spell pack made and uploaded for other users (and talk about efficiency... I for example don't understand the need to make spells without events and conditions and then at map ini create via jass a local trigger that adds those events and conditions to those spell; or using local unit variable c, assign to it the (casting unit) and then assing the local variable c to global variable tempUnit0).

So to answer if there are any things that are needed or not - I don't really know. Many parts use jass which I'm not that proficient with (tho I mostly do understand what it does and how it works, I lack the actual experience) but then those jass parts are also used in (imo) such complicated and totally inefficient way that I'm afraid to really touch the script because I could mess something up (that it works in the original map is a wonder to me - that shows that either something is amiss or that I really do lack the true understanding of jass)
Alright. I'll remove the experience thing then.. Yes the abilities is copied from a spellpack I'll promise u that. I can link the spellpack if u want.
 
Level 25
Joined
Sep 26, 2009
Messages
2,378
You don't have to link anything. I was pointing that out because usually on hive those spells have to meet various requirements - one being that all variables that set how the spell works should be in one trigger or something like that, so even someone who doesn't understand triggering can simply set the spell up to his/her liking.
Of course I am presuming that the spellpack is from hive. If it isn't then it could very well pass in the form presented here.
 
Status
Not open for further replies.
Top