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

Questions

Status
Not open for further replies.
Level 3
Joined
Jan 8, 2011
Messages
70
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.
 
Level 12
Joined
Apr 16, 2010
Messages
584
As i remember i has similar problem i solved it by giving that unit more hp, before he had 10 hp, so to built him i gave him 100 hp - worked, but that was a really long time ago, so i might be wrong, also your builder must have repair ability.
Edit: due to your avatar I thought you where Defskull :p creepy...
 
Level 12
Joined
Apr 16, 2010
Messages
584
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.
 
Level 12
Joined
Apr 16, 2010
Messages
584
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
 
Level 12
Joined
Apr 4, 2010
Messages
862
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:
Level 37
Joined
Mar 6, 2006
Messages
9,243
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.
 
Level 13
Joined
Oct 25, 2009
Messages
995
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)
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
(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.
 
Level 13
Joined
Oct 25, 2009
Messages
995
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:
 
Level 13
Joined
Oct 25, 2009
Messages
995
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.
Top