• 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.

[Trigger] Problem With Custom Gui Spells

Status
Not open for further replies.
Level 3
Joined
Jan 31, 2008
Messages
66
Hi i've been trying to make a universal Spell called Frost Field, and i managed to make it such that the targets get damaged..... but, i also want to add in buffs, for example, like to make the damaged target slow down with the frost effect, but i keep failing to make such a trigger... so can anyone teach mi or give me some pointers? here's my trigger:
  • Frost Field Trigger
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Frost Field
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of (Picked unit)) Equal to (Owner of (Casting unit))
            • Then - Actions
              • Do nothing
            • Else - Actions
              • Unit - Cause (Casting unit) to damage (Picked unit), dealing 200.00 damage of attack type Spells and damage type Cold
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Well the trigger would be like this

  • Untitled Trigger 014.25
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to yourAbility
    • Actions
      • Set unitGroup = (Units in (Playable map area) matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
      • For each (Integer A) from 1 to (Number of units in unitGroup), do (Actions)
        • Loop - Actions
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Random 1 units from unitGroup) and do (Actions)
            • Loop - Actions
              • Unit Group - Remove (Picked unit) from unitGroup
              • Unit - Cause (Triggering unit) to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal
              • Set Point = (Position of (Picked unit))
              • Unit - Create 1 dummy for (Owner of (Triggering unit)) at Point facing Default building facing degrees
              • Custom script: call RemoveLocation(udg_Point)
              • Unit - Order (Last created unit) to Undead Banshee - Curse (Picked unit)
              • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Unit Group - Remove all units from unitGroup
      • Custom script: call DestroyGroup(udg_unitGroup)

You could just use a thunder clap ability like Super-Sheep said, though.
Just make it 99999 AoE and add attachment points so it will look freazing.
 
Level 3
Joined
Jan 31, 2008
Messages
66
wat do u mean by make attachment points? 0.o and i keep trying out the dummy method, can't get it to work though, the created dummy doesn't cast... i dun understand why... :cry:
 
Level 14
Joined
Nov 18, 2007
Messages
1,084
wat do u mean by make attachment points?

Attachment points are like points where you could attach stuff like special effects. An example of an attachment point would be overhead and origin. If you look at Thunderclap in the Object Editor, find Art - Caster. Underneath that would be Art - Caster Attachment Points where you could see "origin" which is an attachment point...
You could also go to http://world-editor-tutorials.thehelper.net/attachments.php
to learn more about attachments or to a tutorial here about attachments in the Tutorial section

dummy doesn't cast...
It could be that your dummy unit doesn't have mana, but the spell you're trying to make it cast has mana.
 
Last edited:
Level 3
Joined
Jan 31, 2008
Messages
66
oh my god... i tried a lot of ways but i still can't make the dummy unit attack.... my trigger is like this:
  • Frost Field Trigger
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Frost Field
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of (Picked unit)) Equal to (Owner of (Casting unit))
            • Then - Actions
              • Do nothing
            • Else - Actions
              • Set FrostFieldCastingUnit_Location = (Position of (Picked unit))
              • Unit - Create 1 DUmmy for (Owner of (Casting unit)) at FrostFieldCastingUnit_Location facing Default building facing (270.0) degrees
              • Unit - Add Frost Field Damage to (Last created unit)
              • Unit - Set level of Frost Field Damage for (Last created unit) to 3
              • Unit - Order (Last created unit) to Undead Lich - Frost Nova (Last created unit)
              • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
it will create dummy units at the position of the picked unit, but it just won't cast the skill.... i dunno why... please help :cry:
 
Level 6
Joined
Feb 12, 2008
Messages
207
humm sorry if its not the right place to ask but always that i try to use the predefined spells in the GUI, the spell is never cast... what am i doing wrong?

for example:
  • Example Trigger
    • Events
      • Unit - A unit enters region
    • Conditions
      • (Entering unit) equal to UNIT1
    • Actions
      • Unit - Order UNIT2 to Undead Banshee - Curse (Entering unit)
for example that trigger wont cast anything on my maps :S
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Ordering units to cast abilities

Ok, probably everyone heard about problems, or had problems, with ordering units to cast their own custom abilities.

Reading the next paragraphs will gain you the knowledge of
  • Order IDs
  • The ' Channel ' ability

Now lets start.

First we will create a ability. Lets say we will base it off the Roar ability.
Now you will notice the lines saying
Code:
Text - Order String - Activate
Text - Order String - Deactivate
Text - Order String - Turn Off
Text - Order String - Use/Turn On

This are (most spells will use the 'Use/Turn On' box) the abilities Order IDs.
A Order ID is a string (text) that tells the game to do something.

If you will look at our custom Roar ability, its Order ID is "roar".

Ok we have our custom ability, now we will go to the trigger editor and create a trigger similiar to this:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Footman
    • Actions
      • Unit - Order (Triggering unit) to Night Elf Druid Of The Claw - Roar

Every time a Footman is attacked he will cast Roar (if he can).
Now this won't have any problem with.
But, what will we do if the custom spell we made isn't written in one of the orders given to us in the trigger ???
If for example we made a custom c00l pwnzor ability that is based on something not on the list what will we do ?

So, what we will do is change the custom ability's Order ID to any ID that IS in the list and then just use it.
For example, if the spell targets a unit, change the Order ID to 'firebolt' and then order your unit to cast 'firebolt'.

WARNING! If a unit has more then 1 abilities based on the same Order ID they will bug each other ! NEVER stack abilities with the same IDs !


Now in theory all this is right. But in truth it isn't.
You can say "then why the hell did we need to read all this", but its better if you understand all I said untill now.
People checked this tons of times and proved it doesn't work a lot of times with the normal WC3 abilities.
However ! with the Channel ability it does work !

The Channel ability is a ability that does absoluthly nothing. It was meant to help us map creators to make triggerd spells.
Since there is already a tutorial on it, I won't be repeating it and ill just give you this link to it.

If you want to know what abilities work with it and which don't, just try them.
Hope this helped.
 
Level 6
Joined
Feb 12, 2008
Messages
207
helped a lot... thanks... its all about order id's ^^
i'll try it later then.. im trying to make a skill that creates a trap that lasts X time, then when a unit aproaches it.. WOOSH, gets ensnared... so ill figure it out... ill use channel with lots of different order id's xD

thanks a lot for the help... im pretty good with triggers, but i suck in the whole Object editor window ^^
 
Level 6
Joined
Feb 12, 2008
Messages
207
as GhostWolf said before, try using Channel ability with order id = chain lightning... then in the trigger window just make the unit cast "orc farseer - chain lightning"... u can do this with all the spells... just be sure that the order id of the channel is the same of the spell u are specifying in the trigger window
 
Status
Not open for further replies.
Top