No error, just trigger Hashjie posted does not work.
That's odd, because for me it does work...
You might be doing something wrong.
By saying it does not work, could you be more specific?
Are the units not walking towards random locations every 1 second when they have 0 mana and are owned by player 1?
I changed that and it is not working.
I do not understand why
MS mana gain= 10
MS mana lost = 10
is setted to 10 and when mine units die, one unit has 10 mana, but it should lose 10 mana per one of mine units is killed!
Eerm well that's completely different then my trigger :S
All my trigger is doing is randomly move a unit if it is owned by player 1 and if it has 0 mana...
Are you refferencing this trigger perhaps?
-
modify
-
Events
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Triggering unit) Equal to MS_general[(Player number of (Triggering player))]
-
Then - Actions
-
Set MS_constant_loss[(Player number of (Triggering player))] = True
-
Else - Actions
-
Unit - Set mana of (Killing unit) to ((Mana of (Picked unit)) + MS_mana_gain)
If so then you might want to closely look what this part does:
-
Unit - Set mana of (Killing unit) to ((Mana of (Picked unit)) + MS_mana_gain)
This sets the mana of the unit who killed the dying unit to be the mana of picked unit (there is no picked unit) + 10.
Could you please explain what exactly you mean with:
is setted to 10 and when mine units die, one unit has 10 mana, but it should lose 10 mana per one of mine units is killed!
I really, really can't make sense of what you're trying to say here.
Which units should have how much mana lost?
Who is one unit?
Explain this more thoroughly and I would be abled to help you out.
You might also want to use completely different triggers then Darkgrom's suggested.
No offense, but they have a few mistakes and can be done more efficiently.
EDIT: I didn't read this post:
1.There is no mana loss when the general is alive, when general is dead all units lose 5 mana per player 4 kill and gain 5 mana per enemy kill.
2.They should get a buff surrender flag, but not lose hp because they would already lose hitpoints by fleeing and not striking back, they just flee and when their mana is more than 0 they will stop fleeing.
3.Of course and the killed loses mana.
There are a few questions I would like to ask:
when general is dead all units lose 5 mana per player 4 kill and gain 5 mana per enemy kill.
Are you trying to say that whenever the general is dead all units will loose 5 mana for each missing (killed) units inside the unit group of that player?
An example would be: A unit gets killed and is owned by a player, if the general is dead at that moment. All units of the player who owned the killed unit should loose 5 mana, is that it?
And they all gain back 5 mana for killing other units?
They should get a buff surrender flag
Don't you mean a special effect? What is the point of having a buff if it doesn't do anything?
and the killed loses mana
How can a killed unit loose mana? It's dead...