Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
There is the integer function Unit - Supply Used By Unit-Type if you want to know what your future unit would take, to determine if you would hit the limit.
Wow thanks guys =D,
Although Kobas, your testmap, i don't think it will work? Because doesn't it need a condition saying,
if foodmax has been reached, say to user, You can not blah blah. Do nothing.
Would this be fine?
((Owner of (Triggering unit)) Maximum Food Used) Equal to 20
I just showed you function
It's up to you how will you use it.
example:
set i = function_call
food[player_number] = food[player_number] + i if food[player_number] > 100 then
remove unit bla bla bla etc etc etc
food[player_number] = food[player_number] - fi else
return (do nothing) endif
Sorry for fail code, but I think that you get the point.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.