Need Trigger Help

ectorzage

New Member
Reaction score
0
Part 1:

Im trying to make a trigger that increases the max life of any unit that attacks by 1 for each attack. I'm also trying to make an anti-cheat system so that this only occurs when you attack an enemy.

Part 2:

Im trying to make a trigger that records the total kills that a particular unit has acquired and bestows certain benefits to that one unit.

I've had little experience with Warcraft 3's trigger system, so Im not sure if these are even possible to set up. Either way, if anyone can think of a solution to help me, Id be greatful.
 

sylvannis mb

New Member
Reaction score
6
ok this is what i have so far, but still not working. You may be able to test it.
First command
Trigger:
  • Untitled Trigger 004
    • Events
      • Time - Elapsed game time is 0.01 seconds
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set kills = (Last created hashtable)


second command
Trigger:
  • help
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) belongs to an ally of (Owner of (Attacking unit))) Equal to False
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Load 0 of (Key (Attacking unit)) from kills) Equal to 0
        • Then - Actions
          • Unit - Add Carrion Swarm to (Attacking unit)
        • Else - Actions
      • Hashtable - Save ((Load 0 of (Key (Attacking unit)) from kills) + 1) as 0 of (Key (Attacking unit)) in kills
      • Unit - Set level of Carrion Swarm for (Attacking unit) to (Load 0 of (Key (Attacking unit)) from kills)
 

Bribe

vJass errors are legion
Reaction score
67
The first part is convoluted and requires you to make a custom "periapt of vitality" that has tons of levels and increases by 1 bonus HP each level (use "auto-fill" on the values, of course). You must set the level of that ability on the hero by +1 each time you want to increase his HP by one point.

Don't you wish there was an easier method?
 

ZugZugZealot

New Member
Reaction score
33
"Unit Starts Attacking" obviously fires when the attack is starting.

"Unit Is Attacked" fires when an attack is finished. (You want this one. It's free of cancel exploiting)
Trigger:
  • Attacked
    • Events
      • Unit - Any Unit is attacked
    • Local Variables
    • Conditions
    • Actions
      • General - If (Conditions) then do (Actions) else do (Actions)
        • If
          • (Attacking Unit) == TheUnit
        • Then
          • Unit - Set (Triggering unit) Maximum Life to (((Attacking Unit) Maximum Life (Current)) + 1.0)
        • Else


Son of a bitch, I thought I was in the SCII Editor forum for some reason.
 

HydraRancher

Truth begins in lies
Reaction score
197
The first part is convoluted and requires you to make a custom "periapt of vitality" that has tons of levels and increases by 1 bonus HP each level (use "auto-fill" on the values, of course). You must set the level of that ability on the hero by +1 each time you want to increase his HP by one point.

Don't you wish there was an easier method?

Oh but there is an easier method.

Read this.
 

ectorzage

New Member
Reaction score
0
Update:

I have the first mechanic set up and working, thank you very much HydraRancher :). Anyways, to be more specific about the second mechanic needed, I would like to have the trigger keep track of the number of kills the unit has made and record that as an integer (lets label this as r). My intent is that everytime r increases by 1, the damage per attack of the unit increases by 1-3. Also, whenever the abilities of the unit are activated, r will play a role in determining the duration/damage/area of effect/etc. If anyone can help guide me to getting this I would be grateful.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top