• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

GUI Spell help please. :)

Status
Not open for further replies.
Level 1
Joined
May 29, 2007
Messages
2
alright, i have two triggers for spells i got from this site, Blade Beam and Dark Slash or Dark Sword i forgot its original name, in the world editor they're exact copies of the original spells with only a few minor changes that are irrelevant to the problem. i have them set to specific spots button wise, yet in-game they seem to switch places every time i cast one, such as, say i casted Blade Beam it'd work fine the first time, but then if i go to cast it again (even during cooldown, it lets me for some reason) it'll cast the other spell. ill post the triggers:

Blade Beam
  • Blade Impact
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Blade Impact
    • Actions
      • Set Warrior = (Casting unit)
      • Set Victim = (Target unit of ability being cast)
      • Set WarriorLoc = (Position of Warrior)
      • Set VictimLoc = (Position of Victim)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Distance between WarriorLoc and VictimLoc) Greater than or equal to 399.00
        • Then - Actions
          • Wait 0.50 seconds
        • Else - Actions
          • Unit Group - Pick every unit in (Units within 512.00 of VictimLoc matching ((Picked unit) Not equal to Victim)) and do (Actions)
            • Loop - Actions
              • Unit - Create 1 minicaster for (Owner of Warrior) at VictimLoc facing (Position of Victim)
              • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Picked unit)
              • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Custom script: bj_wantDestroyGroup = true
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Distance between WarriorLoc and VictimLoc) Less than 400.00
        • Then - Actions
          • Wait 0.45 seconds
        • Else - Actions
          • Unit Group - Pick every unit in (Units within 512.00 of (Position of Victim) matching ((Picked unit) Not equal to Victim)) and do (Actions)
            • Loop - Actions
              • Unit - Create 1 minicaster for (Owner of Warrior) at VictimLoc facing (Position of Victim)
              • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Picked unit)
              • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Custom script: bj_wantDestroyGroup = true
      • Custom script: Call RemoveLocation(udg_WarriorLoc)
      • Custom script: Call RemoveLocation(udg_VictimLoc)
Dark Slash/Dark Sword
  • Dark Blade
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Dark Blade
    • Actions
      • Set Warrior = (Casting unit)
      • Set Victim = (Target unit of ability being cast)
      • Unit - Make Victim Explode on death
      • Unit - Pause Victim
      • Wait 0.05 seconds
      • Special Effect - Create a special effect attached to the left hand of Warrior using Abilities\Weapons\IllidanMissile\IllidanMissile.mdl
      • Set DB_Effects[1] = (Last created special effect)
      • Special Effect - Create a special effect attached to the right hand of Warrior using Abilities\Weapons\IllidanMissile\IllidanMissile.mdl
      • Set DB_Effects[2] = (Last created special effect)
      • Special Effect - Create a special effect attached to the left foot of Warrior using Abilities\Weapons\IllidanMissile\IllidanMissile.mdl
      • Set DB_Effects[3] = (Last created special effect)
      • Special Effect - Create a special effect attached to the right foot of Warrior using Abilities\Weapons\IllidanMissile\IllidanMissile.mdl
      • Set DB_Effects[4] = (Last created special effect)
      • Special Effect - Create a special effect attached to the head of Warrior using Abilities\Weapons\IllidanMissile\IllidanMissile.mdl
      • Set DB_Effects[5] = (Last created special effect)
      • Wait 0.05 seconds
      • Unit - Pause Warrior
      • Wait 0.05 seconds
      • Animation - Play Warrior's attack animation
      • Wait 0.05 seconds
      • Animation - Play Warrior's attack animation
      • Wait 0.05 seconds
      • Animation - Play Warrior's attack animation
      • Wait 0.05 seconds
      • Animation - Play Warrior's attack animation
      • Wait 0.05 seconds
      • Animation - Play Warrior's attack animation
      • Wait 0.05 seconds
      • Animation - Play Warrior's attack animation
      • Wait 0.05 seconds
      • Animation - Play Warrior's attack animation
      • Wait 0.05 seconds
      • Animation - Play Warrior's attack animation
      • Wait 0.05 seconds
      • Animation - Play Warrior's attack animation
      • Wait 0.05 seconds
      • Animation - Play Warrior's attack animation
      • Wait 0.05 seconds
      • Animation - Play Warrior's attack animation
      • Wait 0.05 seconds
      • Animation - Play Warrior's attack animation
      • Wait 0.05 seconds
      • Animation - Play Warrior's attack animation
      • Wait 0.05 seconds
      • Animation - Play Warrior's attack animation
      • Wait 0.05 seconds
      • Animation - Play Warrior's attack animation
      • Wait 0.05 seconds
      • Animation - Reset Victim's animation
      • Animation - Reset Warrior's animation
      • Unit - Make Victim Die normally on death
      • Unit - Unpause Warrior
      • Unit - Unpause Victim
      • For each (Integer A) from 1 to 5, do (Actions)
        • Loop - Actions
          • Special Effect - Destroy DB_Effects[(Integer A)]
also, just so you know, in-game the buttons dont move, but the spells do, as if they switched icons

according to my leak checker, the first one is OK with 5 leaks, and the second one is Excellent with 0 leaks. (i couldnt fix the first leaks because its suggestions were exactly what i had...)

if anyone can help it'd be much appreciated, if you need anymore information i'd be glad to provide it :) thank you

Pwnacles.exe
 
Last edited:
Level 24
Joined
Jun 26, 2006
Messages
3,406
hrm. maybe the icons move around because you have the icons occupying the same space? you probably don't, but it's something easily overlooked.

can't help with the spells, i'm bad with triggers
 
Level 1
Joined
May 29, 2007
Messages
2
lol but the icons dont move, only the spells seem to be switching places, and im sure the triggers are fine, may need something but seem fine to me and my leak checker says theyre fine
 

Rui

Rui

Level 41
Joined
Jan 7, 2005
Messages
7,550
This thread has been moved from the World Editor Help Zone to the Spells and Systems Forum. A redirection link has been left in the original forum to provide a conection between the original place and the new location of this thread. This redirection link will expire in 24 hours.

Pwnacles.exe, if you wish to introduce yourself to the Hive Workshop Community, you can do so here.
 
Level 10
Joined
Jan 21, 2007
Messages
576
The problem is iyou have both spels based off the same spell. Like having a hero with Roar, then copying and pasting roar and renaming it roar two. If the hero has roar and roar two you cast one the other will cast as well. Simpl base one of the spells off a different spell.
 
Level 13
Joined
Nov 22, 2006
Messages
1,260
I just want to make something clear.....when you have two spells based on the same one, one of them will fire (random) because they have the same orderstring, right? So if you change the orderstring of one of those spells, it won't fire random?
 
Changing order string won't help(it is for AI i think) you will have to base them of different spells.

Why are you using the same variables for 2 spells? This will result in that only one of the spells can be cast at a time.
Also, waits are VERY inaccurate(especially on bnet) and you placed the "bj_wantDestroyGroup" at wrong places, they have to be above ForGroup calls.
 
Status
Not open for further replies.
Top