- Joined
- Jul 26, 2008
- Messages
- 1,009
Alright, I got two very easy questions.
First, how do I tell if a player is a human player? I assumed MAP_CONTROL_PLAYER_USER or w/e it is. However I just want to make sure that's right. I wasn't sure if it counted open User slots as "User" even if there's no one in them.
I simply want to make sure the unit that if the unit killed is a Human Player it rewards the killing player properly.
Second, which isn't as easy. I want a shop to sell different items/unit depending on the time of day.
I can set up the time of day change, but what I can't set up is adding and removing the items from shop stock. I've tried a number of things, none of which have worked. What's crazy about this is I have a spell in another game that you can cast on units/items and it adds them to a shop's stock.
The same command won't work here though.
(Can you even remove units/items from shop stock?)
That's what I use, and it's on rect GroupEnum on bj_MapPlayable. The base unit is a shop unit. It just won't add that unit to it's stock.
Thanks
First, how do I tell if a player is a human player? I assumed MAP_CONTROL_PLAYER_USER or w/e it is. However I just want to make sure that's right. I wasn't sure if it counted open User slots as "User" even if there's no one in them.
I simply want to make sure the unit that if the unit killed is a Human Player it rewards the killing player properly.
Second, which isn't as easy. I want a shop to sell different items/unit depending on the time of day.
I can set up the time of day change, but what I can't set up is adding and removing the items from shop stock. I've tried a number of things, none of which have worked. What's crazy about this is I have a spell in another game that you can cast on units/items and it adds them to a shop's stock.
The same command won't work here though.
(Can you even remove units/items from shop stock?)
JASS:
if GetUnitTypeId(GetFilterUnit()) == 'nC01' or GetUnitTypeId(GetFilterUnit()) == 'grha' then
call RemoveUnitFromStock( GetFilterUnit(), 'uC02' )
endif
That's what I use, and it's on rect GroupEnum on bj_MapPlayable. The base unit is a shop unit. It just won't add that unit to it's stock.
Thanks