Im triying to make a trigger so whenever a unit enters region 1, it gives another unit 10 HP. No problem so far.
But when I create a region 2 with the same actions and so on. The unit won´t get any more HP. Just the 10 from before.
Does anyone have a good sulotion for this, or perhaps anyone knows how to do a behavior that heals a unit over time.
Then I could simply add and remove behavior perhaps?
I don't think there is a pre-made behavior that heals over time.
If you know a bit of data then you can make one yourself. You just need to give it a periodic behavior with a Modify Unit effect which adds a few hp.
Otherwise you have to post your code here.
Just telling us that it doesn't work won't help us figure out why.
Hi,
Im triying to make a trigger so whenever a unit enters region 1, it gives another unit 10 HP. No problem so far. But when I create a region 2 with the same actions and so on. The unit won´t get any more HP. Just the 10 from before.
Does anyone have a good sulotion for this, or perhaps anyone knows how to do a behavior that heals a unit over time. Then I could simply add and remove behavior perhaps?
Thanks for your help.
Best regards
Benny
I don't think there is a pre-made behavior that heals over time.
If you know a bit of data then you can make one yourself. You just need to give it a periodic behavior with a Modify Unit effect which adds a few hp.
Otherwise you have to post your code here.
Just telling us that it doesn't work won't help us figure out why.
The trigger I tried was
Event:
any unit enters region 1
Action:
Unit - set civilian Life to (+(10.0) **
And this works, but I have another trigger just like it, but it´s when a unit enters region 2. But it won´t add another 10 HP.
Maybe it is because it´s a Set action and not a add.
Exactly, but you can easily use it like this:
Unit - set civilian Life to (civillian Life +(10.0))
ah, it works now, thanks =)