• 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!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Interact + requirement

Status
Not open for further replies.
Level 13
Joined
Apr 15, 2008
Messages
1,063
(Buff: change owner) + requirement

So I am making a unit that all players will be able to control (via interact - share control). It has excactly one ability, that I need to be conditioned by a requirement (can have different results for each player).
If I add the requirement to the neutral, it validates neutral player, which is useless for me. I also tried using a "Player requirement" validator with the new "creator" player (which should be exactly for this), it doesn't work (validator always returns true). Is there any other way?


EDIT: Currently I use buff to change owner of the shop to respecive player, but the requirement on that unit's abilities still validates as if the unit's owner was neutral player.

(OR if you know about any map that has already done smthing like this - shops with some items disabled for example - please tell me about it)
 
Last edited:
Level 9
Joined
Dec 21, 2006
Messages
490
you could do a shitty workaround.
you create the same building for every player at the same spot. everytime someone selects one of the buildings, a trigger selects the right one for the specific player.

but actually you should be able to validate the caster player even on a shared unit.
 
Level 13
Joined
Apr 15, 2008
Messages
1,063
I have thought of that, but it's not very good solution, i did that in warcraft because of the same thing, why the hell do we need to do that in sc2 too?
I thought of just changing ownership of the building, as I need just one player to use it at time. I just hoped there would be a better solution.

EDIT: The player validation doesn't work (I use the "creator" player). I just tried another solution, I have one neutral unit, and player uses ability to take control of it. So now it's the user's unit, but the requirement STILL doesn't work, it still checks the neutral player.
 
Last edited:
Level 9
Joined
Dec 21, 2006
Messages
490
if only 1 player uses the building at a time then it must work!
try something different, use a unit as validator, every dummy skill (item) has one dummy unit as validator
item xy needs unit z to be bought. 10 players with 15 units sounds bad but i guess it will work.
if condition a is true add dummy unit a to the player, so he is able to buy the item.
i guess you are doing something wrong with the validators
 
Status
Not open for further replies.
Top