Page 2 of 2

Re: Transylvania UPDATEd

Posted: Mon Apr 04, 2011 1:43 am
by 3ICE
AoE ensnare, one of my favorite spells of all time.
But it had to go.
Will be missed.

EDIT: Variables are faster than food dummies.
Add Add
t_emp t_eve A unit is repaired t_emp t_co Unit type is house t_emp t_set Set Player_x_FoodCap = Player_x_FoodCap + 20
Minus Minus
t_emp t_eve A unit dies t_emp t_co Unit type was house t_emp t_set Set Player_x_FoodCap = Player_x_FoodCap - 20
Update Update
t_pla Player - Set Player(x) Food cap to Player_x_FoodCap
The variable is not even necessary, you can just use:
t_pla Player - Set Player(x) Food cap to Property of player x(FoodCap) +- 20

Unless it is possible to go over 300 then back down again.
Why?
Because if you are already at 300 and repair a house, the new food cap will also be 300, making you lose a house's supply provided forever.

Re: Transylvania UPDATEd

Posted: Mon Apr 04, 2011 1:58 am
by samtre
crap, i never thought of that, i was searching for the 'food produced by unit' trigger but forgot about the player triggers....

the houses aren't really being repaired by another unit, it is actually being repaired by itself through a trigger (yes its weird).
Its still a data cache, I've planned it that every village has a food cap of only 100 (10 houses).