• 🏆 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!

Requesting trigger :D

Status
Not open for further replies.
Level 3
Joined
Apr 20, 2013
Messages
36
hi guys :)

well that impale wars map didnt worked good enough and i decided to make a more simple aand easier map to learn and get experience to finish that map better and easier (sorry my english is bad :) )

and i decided to make a Minigame-map named : Catch the Sheep! :D

sounds boring but as a simple map it might be good .....

well, we got a hungry wolf and some sheeps in this ...

thing that i need is a trigger that when the wolf attacked or grabbed or bited or whatevered the sheep, replace their roles ! simple ....

i mean i want the catched sheep to transfer to a wolf and also i want the wolf who catched the sheep to transfer to a sheep :) confusing ??

and also i want them to get away from each other to avoid any loop :)

sry if i confused u :)

and tnx
 
Level 30
Joined
Nov 29, 2012
Messages
6,637
hi guys :)

well that impale wars map didnt worked good enough and i decided to make a more simple aand easier map to learn and get experience to finish that map better and easier (sorry my english is bad :) )

and i decided to make a Minigame-map named : Catch the Sheep! :D

sounds boring but as a simple map it might be good .....

well, we got a hungry wolf and some sheeps in this ...

thing that i need is a trigger that when the wolf attacked or grabbed or bited or whatevered the sheep, replace their roles ! simple ....

i mean i want the catched sheep to transfer to a wolf and also i want the wolf who catched the sheep to transfer to a sheep :) confusing ??

and also i want them to get away from each other to avoid any loop :)

sry if i confused u :)

and tnx

  • Untitled Trigger 001
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacked unit)) Equal to Sheep
      • (Unit-type of (Attacking unit)) Equal to Frost Wolf
    • Actions
      • Unit - Replace (Attacked unit) with a Frost Wolf using The new unit's default life and mana
This when a sheep is attacked by a Wolf, the sheep will turn into a Frost Wolf. For the other way around like the Wolf will turn into a Sheep just change the attacked unit to wolf and attacking unit to Sheep.
 
Level 30
Joined
Nov 29, 2012
Messages
6,637
i made that but i got a problem ....

the changing wont stop :|

sheep transforms to a wolf .... wolf transforms to a sheep .... and again ..... and again ...

now what ?? :?

Well, it is your idea that has the problem, you know. Why would you even tranform both units when attacked vice versa, it will really cause you a lots of prblem Imagine that.... well if you want them to only turn once and not anymore. At the end of the trigger... turn it off.
 
Level 3
Joined
Apr 20, 2013
Messages
36
well that was kind of nice idea ....

well my idea was from my childhood game that someone will be a chaser or something like that and whenever he catched someone, the catched player will be the new chaser and the old chaser must flee like others .... did you ever played that ?
 
Level 30
Joined
Nov 29, 2012
Messages
6,637
well that was kind of nice idea ....

well my idea was from my childhood game that someone will be a chaser or something like that and whenever he catched someone, the catched player will be the new chaser and the old chaser must flee like others .... did you ever played that ?

Well, I suggest when units reached maybe 25% of their life, thats the time you will convert them...

  • Untitled Trigger 001
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacked unit)) Equal to Sheep
      • (Unit-type of (Attacking unit)) Equal to Frost Wolf
      • (Life of (Attacked unit)) Less than or equal to >>Type here the 25% life of the unit (example: unit has 100 life so his 25% life is 25.)<<
    • Actions
      • Unit - Replace (Attacked unit) with a Frost Wolf using The new unit's default life and mana
Because both being attacked will really bug for the editor.
 
Level 11
Joined
Feb 23, 2009
Messages
577
You just need to have something put a separation when one unit is transformed (like all units are put back into starting positions or w/e) so that it cannot happen too fast.

It's all about the system you use, in real life, if you play tag, you could keep tagging each other without moving at all but that wouldn't be fun, so when someone is tagged you pause the game for a sec to let people get away.
 
Level 1
Joined
May 16, 2013
Messages
7
May I try?

  • Catch the Sheep
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Dying unit)) Equal to Sheep
          • (Unit-type of (Killing unit)) Equal to Wolf
        • Then - Actions
          • Unit - Replace (Dying unit) with a Wolf using The new unit's default life and mana
          • Unit - Replace (Killing unit) with a Sheep using The new unit's default life and mana
          • Unit - Make (Last replaced unit) Invulnerable
          • Unit - Set (Last replaced unit) movement speed to 522.00
          • Wait 2.50 seconds
          • Unit - Make (Last replaced unit) Vulnerable
          • Unit - Set (Last replaced unit) movement speed to (Default movement speed of (Last replaced unit))
        • Else - Actions
Invulnerability and movement speed added temporarily to let the (new)sheep run from the (new)wolf.
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
@ Xhiao
dont use dying unit instead use triggering unit. u should store anything u use twice or more into a variable. the stuff in parenthesis.

@TO
Do it like this. It is like Hall masters just improved and with a wait time period were the newly changed unit is paused.
Also hell master dont use attacked unit instead use triggering unit.
  • Untitled Trigger 001
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Sheep
      • (Unit-type of (Triggering unit)) Equal to Frost Wolf
    • Actions
      • Custom script: local unit udg_tempUnit
      • Unit - Replace (Triggering unit) with a Frost Wolf using The new unit's default life and mana
      • Set tempUnit = (Last Replaced unit)
      • Pause unit - tempUnit
      • Wait - 2.00 seconds
      • Unpause unit - tempUnit
      • Custom script: set udg_tempUnit = null
@ Xhiao and MooTiZ
you could increase ur knowledge about triggering by learning the stuff in my tutorial.
Also it will help to increase efficiency and make it easier for u to create advanced triggers.
http://www.hiveworkshop.com/forums/tutorial-submission-283/things-gui-user-should-know-233242/
 
Level 1
Joined
May 16, 2013
Messages
7
@deathismyfriend
Sorry. I forgot what you said last time. :) Anyway, I'll look into your tutorial. Thanks :)
 
Status
Not open for further replies.
Top