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

2 skills colliding, resulting in disappearance of unit

Status
Not open for further replies.
Level 2
Joined
Jan 20, 2009
Messages
11
I have 2 units, a blinker, and a spellcaster. Both have spells that have triggers attached to them. However, when i cast the blink, and then a skill from the spellcaster right after, the blinking unit disappears from the game ... well because:

Shadow Step (the blinking unit's skill)
Events
Unit - A unit starts the effect of an ability
Conditions
(Ability being cast) Equal to Shadow Step
Actions
Unit - Hide (Casting Unit)
Wait 0.9 seconds
Unit - Unhide (Casting Unit)
Unit - Order (Casting Unit) to Stop

and the spellcaster's skill
.. well its long to type so ill take a screeny

can anyone tell me why the spells collide even though they are based on different skills o.0
 

Attachments

  • error.JPG
    error.JPG
    63.2 KB · Views: 86
Level 17
Joined
Feb 11, 2011
Messages
1,860
Try this instead:

  • Shadow Step
    • Events
      • Unit - A unit starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Shadow Step
    • Actions
      • Unit - Hide (Triggering unit)
      • Wait 0.9 seconds
      • Unit - Unhide (Triggering unit)
      • Unit - Order (Triggering unit) to Stop
The reason for your problem is that the "(Casting Unit)" overlaps in your two spells. You must also replace Casting Unit with Triggering Unit in the other trigger.
 
Level 2
Joined
Jan 20, 2009
Messages
11
Oh cool. Thx :)

I'd always thought triggering unit is used seldomly, but more specific event response are used instead o.0...
oh and btw +rep. xD
 
Level 17
Joined
Feb 11, 2011
Messages
1,860
Cool, glad I could help. Using Triggering Unit is also quicker to execute than others, like Casting Unit.

Good luck with your map!

EDIT: Your trigger in the screenshot leaks a bit and could be written more simply:

  • Trigger
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Blizzard (Neutral Hostile)
    • Actions
      • Special Effect - Create a special effect attached to the overhead of (Triggering unit) using [your effect]
      • Special Effect - Destroy (Last created special effect)
      • Set Temp_Point = (Position of (Triggering unit))
      • Set Temp_Unit_Group = (Units within 500.00 of Temp_Point matching ((((Matching unit) is A structure) Equal to False) and (((Matching unit) is Magic Immune) Equal to False)))
      • Custom script: call RemoveLocation(udg_Temp_Point)
      • Unit Group - Pick every unit in Temp_Unit_Group and do (Actions)
        • Loop - Actions
          • Set Temp_Point = (Position of (Triggering unit))
          • Unit - Create 1 Footman for (Owner of (Triggering unit)) at Temp_Point facing Default building facing degrees
          • Unit - Add Battle Roar to (Last created unit)
          • Unit - Order (Last created unit) to Undead Lich - Frost Nova (Picked unit)
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Custom script: call RemoveLocation(udg_Temp_Point)
      • Custom script: call DestroyGroup(udg_Temp_Unit_Group)
 
Last edited:
^Trigger can be improved to add efficiency (+what is 'point' variable?):

Make use of (Triggeirng player) instead of (Owner of (Triggering unit)).
It's pointless to double set 'Temp_point' - do it once.

  • Trigger
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Blizzard (Neutral Hostile)
    • Actions
      • Special Effect - Create a special effect attached to the overhead of (Triggering unit) using [your effect]
      • Special Effect - Destroy (Last created special effect)
      • Set Temp_Point = (Position of (Triggering unit))
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 500.00 of Temp_Point matching ((((Matching unit) is A structure) Equal to False) and (((Matching unit) is Magic Immune) Equal to False))) and do (Actions)
        • Loop - Actions
          • Unit - Create 1 Footman for (Triggering player) at Temp_Point facing Default building facing degrees
          • Unit - Add Blizzard Dummy to (Last created unit)
          • Unit - Order (Last created unit) to Undead Lich - Frost Nova (Picked unit)
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation(udg_Temp_Point)
The reason for your problem is that the "(Casting Unit)" overlaps in your two spells. You must also replace Casting Unit with Triggering Unit in the other trigger.
No - s1ngap0rek1d uses wait, plus (Triggering unit)/(Casting unit) is default global what means TriggerSleepAction can easy bug it.

@s1ngap0rek1d: PPM on trigger, click: 'Copy as custom text' -> enter message editor and make use of
  • tags for later trigger data pasting.
  • It's not hard to make 1st trigger MUI, since like said, Waits ruin your effort.
  • [trigger]Shadow Step
    • Events
      • Unit - A unit starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Shadow Step
    • Actions
      • Custom script: local unit u = GetTriggerUnit()
      • Custom script: call ShowUnit(u, false)
      • Wait 0.9 seconds
      • Custom script: call ShowUnit(u, true)
      • Custom script: call IssueImmediateOrderById(u, 851972)
      • Custom script: set u = null
 
Last edited:
Level 2
Joined
Jan 20, 2009
Messages
11
Lol im almost newbish to the whole custom trigger thing, but im guessing it's JASS.

and i havent learnt about memory leaks unfortunately, and this kinda helped a lot o.0.. slightly understood what it does
but question @spinmaker, because this skill is a unit skill, wouldnt it bug by assigning the unit as u? o.0

And thanks for much support guys. Right now, unit creation proccess going slow, but this is what im planning it to be.

Multiple races chosen from a tavern, similar to melee maps except with different units, tiers, tech trees, and instead of blowing each other bases up (which can still be your main priority), theres a point in the middle of the map where you should hold down.

Basically, for every non-worker unit on that point for the player you get 1 point / second.
If theres 1 enemy unit on the point, points stop adding.
And there's alliances, so you can go something like -ally blue for ally.
Alliances can share the center point of the map
On top of that, lets say you're losing marginally with ur ally, blue, and as time increases, you know he's going to win. You can start attacking his units to get rid of it to slow it down. He will still be allied to you, but if he finds out about it, he can type -unally to start fighting. You can do the same strategy to disrupt your 'ally''s base/workers.

Win condition would be surrender, or X amount of points on the map.

Lol this is probably the wrong section for revealing my map lol.. but w/e xD
 
Status
Not open for further replies.
Top