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

[Trigger] RPG Triggers

Status
Not open for further replies.
Level 3
Joined
Sep 20, 2007
Messages
30
Is anyone know how can i make these RPG triggers?
1. when i deal damage to an unit, there'll be a text showing the damage dealt (colored white). When a unit healed, the floating text will shown green.

2. Making an unit perform an attack chain (instant attack & not critical). when the second attack occurs, there'll be floating text showing "1". 3rd attack: "2". 4th : "3". etc...

3. I wnt to make bosses with HP more than 500.000. So i think i want to make the lumber bar as a boss' HP bar. When encounter the boss, the lumber bar will go into boss' HP value. When the boss hit by anything(attck & spell), the boss' original HP will recovers and the lumber will goes down as the damage value. When the lumber is reaching 0, the boss will die. This trigger also works to healing. Is it possible?

4. Making AoE healing (instant & not regenerate). Can i use the AoE damage with negative damage value?

that's all... Thanks...
 
Level 6
Joined
Mar 2, 2006
Messages
306
4. find an item called scroll of healing. read the name of ability it casts. find the ability, make a copy and work on it.

2. do you mean attacks to one specific unit, attacks from one specific unit, or everyone to everyone?

3. is it possible for player1 to attack boss1 while player2 attacks boss2? if not, this is relatively easy.

1. same question as for #2
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
For 3 (since it seems its still unanswerd)

First trigger is just to set the 2 variables (2 Integars)
  • Unknown
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Boss_HP = 500000
      • Set Heal_For_Wood = 0

And here is the real thing
  • Unknown
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Triggering unit) Equal to Your_Boss
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner_Of_Boss) Current lumber) Greater than 0
        • Then - Actions
          • Set Heal_For_Wood = (Boss_HP - (Integer(Life of(Your_Boss )))
          • Player - Set Owner_Of_Boss Current lumber to ((Owner_Of_Boss) Current lumber) - Heal_For_Wood)
          • Unit - Set life of Your_Boss to ((Life of Your_Boss) + (Real(Heal_For_Wood)))
          • Set Boss_HP = (Integer(Life of Your_Boss))
          • Set Heal_For_Wood = 0
        • Else - Actions
Hope this works for you.
 
Last edited:
Level 3
Joined
Apr 7, 2007
Messages
48
The attack chain idea is actually quite interesting.
If you aren't currently using custom values on units try that.
Like you attack with spell 1 - custom value is set at 1. Then, in order to hit with spell 2, the custom value would have to be one .. etc. Oh and just throw the floating text in there, that shouldn't be too difficult.

As for green text after healing, just make a trigger that when unit a casts healing a healing spell on unit b green floating text pops up with the amount healed.
 
Level 3
Joined
Sep 20, 2007
Messages
30
Sorry for replying for such a long time...


edge[d1];370258 said:
2. do you mean attacks to one specific unit, attacks from one specific unit, or everyone to everyone?
An everyone to everyone attack.

edge[d1];370258 said:
3. is it possible for player1 to attack boss1 while player2 attacks boss2? if not, this is relatively easy.
Yes, that's what i meant. Is that difficult?

And for 'ihatecapslock': thanks. but what is custom value anyway? is it integer?
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
For the boss trigger you can use the trigger I made (although its more made for all players VS boss).
Here is the damage check

  • Unknown
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • Set Attacked_Unit = (Attacked unit)
      • Trigger - Add to Unknown2 the event (Unit - Attacked_Unit Takes damage)

  • Unknown2
    • Events
    • Conditions
    • Actions
      • Floating Text - Create floating text that reads (String((Damage taken))) at (Position of Attacked_Unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
 
Level 3
Joined
Apr 7, 2007
Messages
48
  • CUSTOM VALUE
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Chain_Ability_1
    • Actions
      • (Any additional effects here)
      • Unit - Set the custom value of (Target unit of ability being cast) to 1
A custom value is like a little sitcky note that you can tag onto a unit. It stores only integers and you only get 1 sticky per unit. Its used in RPGs for like, assigned items (you can use custom values for items too).
 
Level 1
Joined
Nov 20, 2007
Messages
4
I need help with a trigger too.How do you make a unit go to a point only if your heros are near its range.I think i may have figured it out but my unit that needs to be followed returns to back if heros are not in range.pls help
 
Level 1
Joined
Nov 20, 2007
Messages
4
i need a trigger to make unit stay on ground.when hereos get out of the range i ordered unit to stop.but if he stops for to long he goes back.
 
Level 1
Joined
Nov 20, 2007
Messages
4
yeah i found hold position afterwards but the unit still stops sometimes and u have to go back again and enter its range .can you give me a better trigger for following a npc unit?and i still need to make a hero selection trigger that will wait for other players to select theyre hero.I couldn't figure that one out.pls help i will ad to reputation
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Ok I didn't really understand what you need the hold position so please explain.
About the selecation I think this will work.

  • Unknown
    • Events
      • Time - Elapsed game time is 0.05 seconds
    • Conditions
    • Actions
      • Set Number_Of_Heros = 0
      • -------- This will later tell us how much heros where chosen --------
      • Set Number_Of_Players = ((Number of players) - 2)
      • -------- The (-2) is just in case you have 2 computers which normaly games have --------
  • Unknown2
    • Events
      • Events
    • Conditions
      • Conditions
    • Actions
      • Unit - Create 1 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing degrees
      • Set Number_Of_Heros = (Number_Of_Heros + 1)
  • Unknown3
    • Events
      • Events
    • Conditions
      • Number_Of_Players Equal to Number_Of_Heros
    • Actions
      • Actions
  • -------- Probably you will want to activate triggers here --------

[Number_Of_Players] and [Number_Of_Heros] are both Integars.

[Edit] I just thought that leavers would bug it, so you would need to add another trigger

  • Unknown4
    • Events
      • Player - Player 1 (Red) leaves the game
      • Player - Player 2 (Blue) leaves the game
      • Player - Player 3 (Teal) leaves the game
    • Conditions
    • Actions
      • -------- Add all players in the event --------
      • Set Number_Of_Players = (Number_Of_Players - 1)
 
Level 1
Joined
Nov 20, 2007
Messages
4
thanks alot , nevermind the hold position thing.i found out that if the unit that needs to be followed is not neutral hostile won't go back to its original location..
 
Level 6
Joined
Nov 28, 2007
Messages
203
How to make super-high numbers in Warcraft Editor.

3. I wnt to make bosses with HP more than 500.000.

Just shift-click where the HP is (In object editor).
Then you can write 100 000 000 0 (one billion) there :D (it could make the loading time very long if you, for example, if the maximum level (in gameplay constants) is over 1million, the loading time will be around 5mins extra. if you set it over 10millions, then the game will crash(mostly).).
You can do it almost everywhere (Object editor, gameplay constants etc, but not trigger editor.)
This has helped me alot while making short maps ^^
 
Last edited:
Level 12
Joined
Aug 20, 2007
Messages
866
Damage Detection

Recently I learned away to do damage detection to get a hold of how much damage is done, exactly, when a unit is attacked

It's got something to do with the "Unit - Takes Damage" event, and the action that adds new events to other triggers

Using the "add events" actions you can make the unit specific events (takes damage only works for specific units) work for anything, because the "add event" action can add "event responses"

Using that, you can make a completely accurate dmg detection for attacking units, although i don't know everything about this method, and it lagged pretty bad for me when i did it once ><

As for the healing, yeah you could just make the value based off the level of the ability being cast (or if your using more than spell just the spell)
 
Last edited:
Level 12
Joined
Aug 20, 2007
Messages
866
X_X

lol

I saw the event "Unit is Attacked" in the trigger, and then i just glazed over it

Sorry about that, yeah thats probably the best way to do it

Do you know if that system lags???, and if so, why???
 
Level 12
Joined
Aug 20, 2007
Messages
866
I made a different way of doing it, but I figure out why it was so damned laggy

and nah, it doesn't leak, i'm reeeeal careful when it comes to leaks, cuz they really f*ck things up

There was another trigger, that used that kind of dmg event type of thing

Except, when the unit took dmg it would choose a nearby priest with heal wave, and check its HP, the whole point was to get an Auto-Cast Heal Wave

The map was a big battle type of map, so the trigger was running faster than .001 X_x (like massive battles that can last 3mins)

I though maybe it was due to the dmg detection system
But then i realized it was the combo of ridiculous amounts of trigger fires + ridiculous amounts of units = deadly lag

By the way, for Auto-Cast, I'm just gonna use a trigger that fires every 1.00 secs, and checks each priest for units, and heals one of em (which in-turn bounces about healing others as well)
 
Status
Not open for further replies.
Top