Skip to content
User Avatar
#4009
Auto-translated

I tried swapping objects 1 and 3, but left the code as is.

It was like this:
first player = object "1"
second player = object "2", and so on.
The 3rd player and the 3rd object, and so on up to the 8th, didn't work.

Now it's like this:
the first player touches object "3" and everything works.
the third player touches object "1" and doesn't work.

This means the code is correct and works for all 8 functions.

It seems the problem is with the player number - it works for 2 players, but not for 6.
I'll have to abandon the great idea of a bonus that the human player can choose.



Added 28 minutes later
Gerter
Well, if you look at the DialogBox code, you can assume that the problem is with the use of GetCurrentPlayer there. TalkBox expects the first argument to be not the player number, but its filter. For the 1st and 2nd player, the filter is equal to the number, but not for 3+. Therefore, it probably only works for the first two players. If the problem is this, then the solution would be to wrap the first argument of DialogBox - GetPlayerFilter(GetCurrentPlayer())
I added the filter retrieval, everything works now, thank you