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

A bunch of triggering help requests needed in here.

Status
Not open for further replies.
Level 30
Joined
Jan 31, 2010
Messages
3,552
Hi there. I need the following triggers to multiform my map on which I am currently working on.

Chapter I: Pillaging Heroes
I need a trigger that would add gold whenever a hero attacks a building that is enemy type. Randomly 1-3 gold is added to attacker per attack. MUI, please. Also, I would like that the gold received would be visible where the attacked unit is.


Chapter II: Fixed kills
In my map, players purple and pink are AI-s. It just gets really annoying whenever one of them ,,steals" a kill. So, I would like a trigger that would give credits to a player who last-hitted instead of AI. This applies only for last 100 damage, so that if player dealt damage till 101 hp, and AI killed it, AI will gain credits. Players usable are Red Blue and Teal team upped with Purple, and Green, Orange and Yellow team upped with Pink.

Chapter III: Blunt Towers
Also, why all my enemy's AI towers and units are automaticaly attacking my low hp hero instead of others? I sense that has something with priority. How to make them ,,stupid" and ,,blunt", meaning they will first try to kill all the creeps, then heroes?

Any helpers will be rewarded reputation point.
 
Last edited:
Level 7
Joined
Dec 24, 2009
Messages
257
Some "Pillage" that involves trigger... I know what you need there
Make an unit that When an unit attacks, set the level of the "Pillage" ability of the attacking unit to an random number. You will get what you need
 
Level 19
Joined
Feb 25, 2009
Messages
2,004
  • Pillage
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • ((Attacked unit) is A structure) Equal to True
          • ((Attacking unit) is A Hero) Equal to True
    • Actions
      • Set TempInt = (Random integer number between 1 and 3)
      • Player - Add TempInt to (Owner of (Attacking unit)) Current gold
      • Floating Text - Create floating text that reads (|cffffcc00+ + ((String(TempInt)) + |r)) above (Attacking unit) with Z offset 0.00, using font size 9.50, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Hide (Last created floating text) for (All players)
      • Floating Text - Show (Last created floating text) for (Player group((Owner of (Attacking unit))))
      • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Change the lifespan of (Last created floating text) to 1.10 seconds
      • Floating Text - Change the fading age of (Last created floating text) to 0.10 seconds
That could help you for the custom pillage thingie.

I'm kinda lazy to do the others so yeah.
 
Level 7
Joined
Jan 29, 2010
Messages
213
Chapter III
Remove trigger like this:
  • Melee Game - Run melee AI scripts (for computer players)
This is only for computers. In dota isn't any triggers which would Blunt them and it works fine ...
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Blunt Tower

  • Blunt Tower
    • Events
      • Unit - A unit enters (Tower Region)
    • Conditions
    • Actions
      • Set Hero = (Units in (Tower Region) matching (((Triggering unit) is A Hero) Equal to True))
      • Set Enemies = (Units in (Tower Region) matching (((Matching unit) is A Hero) Equal to False))
      • Unit Group - Pick every unit in Enemies and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is A Hero) Equal to False
            • Then - Actions
              • Trigger - Turn on Checking Condition For Units <gen>
            • Else - Actions
              • Unit Group - Pick every unit in Hero and do (Actions)
                • Loop - Actions
                  • Trigger - Turn on Checking Condition For Hero <gen>
  • Checking Condition For Units
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit - Order (Tower) to Attack (Picked unit)
  • Checking Condition For Hero
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit - Order (Tower) to Attack (Picked unit)
Both Checking Conditions triggers are Initially Off (untick the Initially On option)
 
I post you here 1st and 3rd problem solved, havent time for the 2nd problem, but for sure it gonna be done today (later). Enjoy!

3rd: I created trigger that choose a target for tower, 1st one that it sees and untill it's dead tower won't change his target. Post if need any other improvements and stuff like that.

EDIT: Map has beed improved a bit.
EDIT2: Targets are now chosen more rapidly, it prevents from occuring minor mistakes in targeting when many units enter given tower's region.

What u mean exactly with 'credits', i want to be sure what are your intentions before i gonna solve your 2nd problem. Post.
 

Attachments

  • @problem solved.w3x
    27.4 KB · Views: 41
Last edited:
Level 2
Joined
Sep 3, 2010
Messages
22
Fixed Kills works just like the one in DotA, but DotA is more annoying, instead of giving you the credits, your just counted as an assist not the actual one who did all the work. Might as well try this one.
 
Status
Not open for further replies.
Top