• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Empire : Total war

Status
Not open for further replies.
Level 9
Joined
Jun 20, 2008
Messages
476
As im making a new game wich is based of ETW (my shortening for Empire Total War) I needed some triggers and stuff.

This trigger i have beneath here is supposed to also increase max life for targeted unit +2 (the rest works)

  • swordman1
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Fuse
      • (Unit-type of (Casting unit)) Equal to Army of Swordman
      • (Unit-type of (Target unit of ability being cast)) Equal to Army of Swordman
    • Actions
      • Unit - Set mana of (Target unit of ability being cast) to ((Mana of (Target unit of ability being cast)) + 1.00)
      • Unit - Set life of (Target unit of ability being cast) to ((Percentage life of (Target unit of ability being cast)) + 2.00)
      • Unit - Remove (Casting unit) from the game
      • Game - Display to (Player group((Owner of (Casting unit)))) the text: Youre Army's have f...
Also i will be editing this if i have any other trigger problems

I will give you rep and cred if you help me (beneath will be a list if you helped me with this map
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,201
This trigger i have beneath here is supposed to also increase max life for targeted unit +2 (the rest works)
Then why are you modifying the current life of the unit and not adding a tome / ability to it which would increase max life by 2?

You can not modify max life via natives directly, you can however via adding tomes or abilities to a unit which modify max life.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Here's how to do it with tomes:

Copy and paste manual of health item and rename it. Copy and paste Item permanent life gain ability and rename it. Change Data - max life gained to 1. Replace the ability in the item you just copied to your new ability.

Now you have an item that increases max HP by 1.

Then when you cast the ability, create x amount of those items for the unit. You can loop it.

If the unit is not a hero, you need to give it a modified inventory ability to be able to create items for the unit. Copy and paste Special - Units - Unit Inventory Human. Rename it and change "can use items" to true.

Now detect whether the targeted unit is a hero or not. If it isn't, add the inventory ability for it, create the tomes, then remove the inventory ability. If it is a hero, you can skip the inventory hassle.
 
Status
Not open for further replies.
Top