• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Questions

Status
Not open for further replies.
Sorry im on psp so cant write much. 1. A unit begins casting an ability. Ability equal to build unit. Wait 10 seconds (instead of build time). Create unit at point (casting unit). I will answer the second question in the morning.
 
Well you could use two triggers:
  • Settings
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set Real = (Facing of (Your Unit))
  • Add Ability
    • Events
      • Game - Real becomes Equal to 90.00 //This is angle that you want to detect
    • Conditions
      • (Facing of (Your Unit)) Equal to (==) Real
    • Actions
      • Unit - Add 'Aloc' (Your Ability) to (Your Unit)
Think this might help.
 
You could another condition to second trigger that checks if the angle is not 90 or what ever you want remove ability.
But be aware that removing and adding abilities to fast can cause lags in big maps, so do like this: when angle is 90 run another trigger where it adds ability, or if angle is not equal to 90 remove ability.
This would work perfect
 
No, bad method = bad.

hold-on.

  • Events
    • Time - Every 0.05 seconds of game time
  • Conditions
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Facing of (Your Unit)) Equal to 90.00
      • Then - Actions
        • Unit - Add ability to Your Unit
      • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Level of Your Ability for (Triggering unit)) Equal to 1
          • Then - Actions
            • Unit - Remove Your Ability from (Your Unit)
          • Else - Actions
Edit: This is how u compile the big crap up to a smaller crap. :P
 
Last edited:
The trouble with exact facing is that...it has to be exact. If you order a unit to face a unit, then when the unit stops the facing procedure, then angle can be a bit off.

The angle from unit 1 to unit 2 might be 90, but the facing of unit 1 can be 86,77 for example.

That's why you may need to add and agle tolerance.

90 is the desired facing here and 10 is the tolerance to both positive and negative direction, making the total tolerance 20 °.

  • Untitled Trigger 024
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Acos((Cos(((Facing of Paladin 0003 <gen>) - 90.00))))) Less than 10.00
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Holy Light for Paladin 0003 <gen>) Less than 1
            • Then - Actions
              • Unit - Add Holy Light to Paladin 0003 <gen>
            • Else - Actions
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Holy Light for Paladin 0003 <gen>) Greater than 0
            • Then - Actions
              • Unit - Remove Holy Light from Paladin 0003 <gen>
            • Else - Actions
This is easy to convert to MUI.
 
The trouble with exact facing is that...it has to be exact. If you order a unit to face a unit, then when the unit stops the facing procedure, then angle can be a bit off.

The angle from unit 1 to unit 2 might be 90, but the facing of unit 1 can be 86,77 for example.

That's why you may need to add and agle tolerance.

90 is the desired facing here and 10 is the tolerance to both positive and negative direction, making the total tolerance 20 °.

  • Untitled Trigger 024
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Acos((Cos(((Facing of Paladin 0003 <gen>) - 90.00))))) Less than 10.00
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Holy Light for Paladin 0003 <gen>) Less than 1
            • Then - Actions
              • Unit - Add Holy Light to Paladin 0003 <gen>
            • Else - Actions
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Holy Light for Paladin 0003 <gen>) Greater than 0
            • Then - Actions
              • Unit - Remove Holy Light from Paladin 0003 <gen>
            • Else - Actions
This is easy to convert to MUI.

(Acos(Cos) is what? =_=

EDIT:I ask 1 things also,can i let ALL unit in the game + armor?
there only got triggering unit,matching unit and anothers...
And it make me confused xD
EDIT 2:Can i face an unit and add abiltiy?(The unit also face angle and the triggering unit)
 
(Acos(Cos) is what? =_=

Acos(Cos(angle1 - angle2)) fnds the difference , or "distance" between angles. The distance between 30 and 50 is 10. The distance between 350 and 10 is 20.

EDIT:I ask 1 things also,can i let ALL unit in the game + armor?
Pick all units in the map and give the ability. Or create a dummy unit with dummy Devotion Aura, give it large radius and allow all targets.

EDIT 2:Can i face an unit and add abiltiy?(The unit also face angle and the triggering unit)
Please clarify.
 
Acos(Cos(angle1 - angle2)) fnds the difference , or "distance" between angles. The distance between 30 and 50 is 10. The distance between 350 and 10 is 20.


Pick all units in the map and give the ability. Or create a dummy unit with dummy Devotion Aura, give it large radius and allow all targets.


Please clarify.

Eh,i use picture better =_=
picfb.jpg

Please give me trigger,sometime i don't understand =_= :goblin_boom:
 
eh,these peasant in black box will add ability(i 4got set the face angle)
these peasant in black box,if they face the enemy and the sand bag at them face place,
they will add ability,
if they turn to another place(doesn't face sand bag already),remove the ability.
got idea?
Red box later i said,i need to do somethings.
 
Status
Not open for further replies.
Back
Top