PDA

View Full Version : onObjectPickUp in Hotseat is fed the wrong player_color



OnlyAnEgg
08-04-2017, 09:27 AM
Pardon me if this was posted elsewhere, I looked but couldn't find any reference to this.

I've identified a bug in hotseat with the onObjectPickUp function receiving the wrong player_color.



function onObjectPickUp(player_color, obj)
print("Playercolor = " .. player_color)
end


this code will always print the player_color of player 1 in hotseat games when any object is picked up, regardless of which player actually picks up the objects.
I don't have this problem with regular multiplayer games, so at this time I think it's isolated to Hotseat.

This is also occurring with the onPickedUp function, attaching this code to an object will likewise always receive the color of player 1 regardless of who touches the object in a hotseat game.



function onPickedUp(player_color)
print("Playercolor = " .. player_color)
end


Note: I don't have this problem with buttons.
The click_function(Object objectButtonClicked, string playerColorClicked) is properly receiving the correct playerColorClicked, even in hotseat.