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

[Solved] Trigger SOMETIMES works, sometimes does not

Status
Not open for further replies.
Level 2
Joined
May 31, 2017
Messages
9
It's a simple trigger: condition: specific unit changes ownership action: other two specific buildings change ownership to owner of the ownership changed unit
Problem is, that it's not error of the code, i used same way of code to other places on my massive map... yet it somehow does not work every time it should.
Any idea why and how can i fix it?
 
Level 13
Joined
May 10, 2009
Messages
868
It's a little bit hard for us to help you out without visualizing some triggers or screenshots. Could you please post your trigger and describe what happens to that specific unit through the game before activating such trigger?

NOTE: For that, right click your trigger name (on top of the event block), select Copy As Text, and finally...
Untitled-1.png


[trigger] paste it here within these tags [/trigger]
 
Last edited:
Level 2
Joined
May 31, 2017
Messages
9
I am sorry to bother you all i just probably solved the problem. It was bugging becouse a capturable unit (ring of power ... that shiny ring on the ground) was coded to change ownership when its health drops bellow 25% which in turn triggers that "buggy trigger"... but i found out i brainlessly created a trigger to ressurect that ring in case it's destroyed due to overdamaging... and the trigger replaces the unit with same unit-type unit but it no longer triggers the trigger (of course). So i am really sorry for posting this thread but has anyone any idiea how to create a trigger to ressurect a unit/building imediately if it gets destroyed? I solved my problem temporarily by raising the hp limit to 50% and doubling its max health.

EDIT: i gave the unit a custom ressurection spell and everything now works fine. Thank you for your time and consider this thread solved.
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,287
So i am really sorry for posting this thread but has anyone any idiea how to create a trigger to ressurect a unit/building imediately if it gets destroyed?
I do not even see why you need such a trigger.

One can prevent destruction by in response to the unit takes damage event raising its maximum and current life to something stupid if the damage would be fatal and then triggering the capture actions. After the damage is dealt (0 timeout timer?) restore maximum life to normal. Same mechanics used by custom shield systems except infinitely easier since one just needs to prevent death and not keep track of current life.
 
Status
Not open for further replies.
Top