• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[General] Shogun Risk trigger, anyone?

Status
Not open for further replies.
Level 5
Joined
Mar 26, 2020
Messages
66
Greeting! Anyone knows the trigger of Shogun Risk mod? its an old mod but i really want that 'capture low hp buildings' trigger, would ask of how to unprotect a map but since you guys don't tolerate that and i don't have any intention to own someone's map but the triggers only

i really need that trigger in my mod.
 
Last edited:
Level 5
Joined
Mar 26, 2020
Messages
66
You should explain the mechanics of the trigger. Do you attack the structures? Is there an ability involved? Is there a wait before the capture completes? Can the capturing process be interrupted?
ahh, my bad.

it should be like this: attacking enemy stuctures, when the structures reach certain threshold low HP of the trigger, make that low HP structure into yours with replenished health/repair
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,537
Alright, so a very basic design would be like this:
  • Capture Structure
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacked unit) is A structure) Equal to True
      • (Percentage life of (Attacked unit)) Less than or equal to 25.00
    • Actions
      • Unit - Change ownership of (Attacked unit) to (Owner of (Attacking unit)) and Change color
      • Unit - Set life of (Attacked unit) to 100.00%
      • Unit - Order (Attacking unit) to Stop.

Note that this Event fires before the attack's damage is dealt, which can be undesirable.
If you want it to happen in response to damage taken then you should use a Damage Engine -> Damage Engine 5.7.1.2.

Additionally, nothing in this trigger is preventing a player from attacking and recapturing their own structure.
If that's a problem then you can add another Condition to prevent friendly fire:
  • (Owner of (Attacked unit)) Not equal to (Owner of (Attacking unit))

Alternatively, you can create a friendly fire trigger which makes the above condition unnecessary.
  • Friendly Fire
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacked unit) belongs to an ally of (Owner of (Attacking unit)).) Equal to True
    • Actions
      • Unit - Order (Attacking unit) to Stop.
 
Level 5
Joined
Mar 26, 2020
Messages
66
cool! but is it possible to change the unit/structure with that trigger? like same of what i said WITH after owning it it will change to specific units of players

i mean ex: when the structures reach certain threshold low HP of the trigger (Barracks), make that low HP structure into yours with replenished health/repair (Moonwell)
 
Level 5
Joined
Mar 26, 2020
Messages
66
Yeah, use the Replace Unit function.
  • Unit - Replace (Attacked unit) with a Moonwell using The new unit's life and mana
just got hands on the pc, so i tried it and it somewhat works, the set life to 100% don't work...but one last thing how to set that trigger to specific player?

ex: same trigger but the attacking unit owned by [specific player] attacked structure will change unit to [specific player]?
 
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,537
Your replace unit action is probably setup wrong, make sure it isn't taking the life/mana of the attacked unit and instead using the new unit's default values.

  • Unit - Replace (Attacked unit) with a Moonwell using The new unit's life and mana
  • Unit - Change owner of (Last replaced unit) to Player 1 (Red)
Also, there's a Player condition that lets you check the owner of units.
  • Conditions:
  • (Owner of (Attacked unit)) Equal to Player 1 (Red)

Show me your triggers if you're still having trouble. How To Post Your Trigger
 
Level 5
Joined
Mar 26, 2020
Messages
66
Your replace unit action is probably setup wrong, make sure it isn't taking the life/mana of the attacked unit and instead using the new unit's default values.

  • Unit - Replace (Attacked unit) with a Moonwell using The new unit's life and mana
  • Unit - Change owner of (Last replaced unit) to Player 1 (Red)
oh, you're right, i set it as mana, no wonder its not full health on capture lol
Also, there's a Player condition that lets you check the owner of units.
  • Conditions:
  • (Owner of (Attacked unit)) Equal to Player 1 (Red)
sweet! imma try this tomorrow~
 
Status
Not open for further replies.
Top