You must be logged in to post messages.
Please login or register

Scenario Design Discussions
Moderated by GoSailing

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: A couple of questions
posted 01-31-04 03:52 PM EDT (US)   
I was wondering how I get individual Units to self-heal. This also includes towers and walls. I know France does it automatically but I can't seem to change the rate at which the towers heal? I would like to add this attribute to other civilizations as well.

For instance; when I trigger my France towers to increase the rate at which their power returns (object, effect, class attribute, manarechargerate, trigger etc.) this works, but when I trigger the tower to "containerhealinghp/sec+" this does nothing.....

This is probably an easy fix but I can't seem to get it to work.

thanks

Replies:
posted 01-31-04 03:55 PM EDT (US)     1 / 3  
Try hitpoints instead of "containerhealinghp/sec+".
posted 01-31-04 05:10 PM EDT (US)     2 / 3  
-trigger. looping. true for 1-3 seconds.
-condition> anyunit. player x. has attribute hit points min 0 max 99 % exists. dynamic number min 1 max 1000
-effect> unit attribute. anyunit. player x has attribute hit points min 0 max 99 % set to increase by 1 or 2

This will heal all objects on the map. If u dont want buildings healed, tag buildings with a unit variable, or something else, I can look into it if u want.

[This message has been edited by _o0XxX0o_ (edited 01-31-2004 @ 05:17 PM).]

posted 01-31-04 05:39 PM EDT (US)     3 / 3  
Actually, because 99% of hitpoints will not be, for example, 599/600, and because your healing could go over the 100% mark, it's best to use this trigger setup:

Trigger 0
Starting: On
Looping: On
Conditions True For: (your choice)

No Condition Required

Effect 0
(From Effects/Object section)
Unit Attribute
Hit Points
Increase by (your value - for fast healing, try about 4-5)
NotPercentage
Use Object -
Object Specification
Any Player
Object - (your choice)
Has Attribute - Hit Points < 100 (Yes Percentage)

Effect 1
(From Effects/Object section)
Unit Attribute
Hit Points
Exactly 100
Yes Percentage
Use Object -
Object Specification
Any Player
Object - (your choice, same as above)
Has Attribute - Hit Points = 100 (Yes Percentage)


The second effect takes care of any 'overflow'. Hope that helps!

Empires Heaven » Forums » Scenario Design Discussions » A couple of questions
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Empires Heaven | HeavenGames