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

Getting attacked workaround

Level 12
Joined
Jul 5, 2014
Messages
551
I really did what I could to make this work but the damage detection option only applies to specific units and I have an old 1.26 version. All I'm trying to do is making a game react when a unit (the hero), identified through variable, not personal ID, receives damage from particular unit group (Bandits), it's a game over. The "attacked" and "attacking" option seems to trigger just as the units prepare attacking. Is there a trick to bring this attack at least close to hitting, so the hero has a chance for last second avoid?
 
Level 30
Joined
Aug 29, 2012
Messages
1,385
That would be so much easier to do in 1.31, so you need to use the old work around with "add event"

This is your game over trigger with no event

  • Game Over
    • Events
    • Conditions
      • (Unit-type of (Damage source)) Equal to Footman
    • Actions
      • Game - Defeat Player 1 (Red) with the message: Defeat!
And this is another trigger that will add the event to the above

  • Add Unit
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Trigger - Add to Game Over <gen> the event (Unit - MyHero Takes damage)
When you do it this way, the event "specific unit" lets you choose a variable or a preplaced unit, which you can't do otherwise

All that being said, I cannot remember if "damage source" as an event response existed in 1.26, if not, that will be challenging to detect who's dealt the damage
 
Level 45
Joined
Feb 27, 2007
Messages
5,578
All that being said, I cannot remember if "damage source" as an event response existed in 1.26, if not, that will be challenging to detect who's dealt the damage
It exists; we had damage engines back then lol.

@WarCortez There is a version of Bribe's DamageEngine compatible with 1.26, which would allow you an easy event for "a unit is attacked" and then you just have to check if the units are owned by the bandits or are the right type or are in the right group, etc.. You can find information about it in the Legacy Code & Requirements tab of the resource page here: Damage Engine 5.A.0.0
 
Level 12
Joined
Jul 5, 2014
Messages
551
That would be so much easier to do in 1.31, so you need to use the old work around with "add event"

This is your game over trigger with no event

  • Game Over
    • Events
    • Conditions
      • (Unit-type of (Damage source)) Equal to Footman
    • Actions
      • Game - Defeat Player 1 (Red) with the message: Defeat!
And this is another trigger that will add the event to the above

  • Add Unit
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Trigger - Add to Game Over <gen> the event (Unit - MyHero Takes damage)
When you do it this way, the event "specific unit" lets you choose a variable or a preplaced unit, which you can't do otherwise

All that being said, I cannot remember if "damage source" as an event response existed in 1.26, if not, that will be challenging to detect who's dealt the damage
Thank you, that's even better than I hoped though at first I thought it applied the unit attacked effect because it detected the damage so fast, I could only see it after the game over, lol. Yes, I have damage source detection and fortunately works for group identification.

  • ((Damage source) is in Bandits) Equal to True
On a side note, something's wrong with the site? It often struggles loading.
 
Level 24
Joined
Feb 27, 2019
Messages
833
On a side note, something's wrong with the site? It often struggles loading.
Ive often heard of people experiencing issues. One time I couldnt even access the site on my computer. I could access the site via my phone, no problems. I turned off my vpn, restarted my computer and turned off adblock but still couldnt access it. After I cleared all internet data (history, cache, etc) it has worked like a charm. So as far as I can tell, these problems are client based. I believe I recieved the bad gateway error.
 
Level 12
Joined
Jul 5, 2014
Messages
551
Ive often heard of people experiencing issues. One time I couldnt even access the site on my computer. I could access the site via my phone, no problems. I turned off my vpn, restarted my computer and turned off adblock but still couldnt access it. After I cleared all internet data (history, cache, etc) it has worked like a charm. So as far as I can tell, these problems are client based. I believe I recieved the bad gateway error.
I didn't yet get that but the site didn't load but sometime later it worked again. I mainly use Firefox and when I tried on Chrome, it loaded maybe a little easier. I first thought internet issue but others sites load just fine.
 
Top