Getting player number in Lua?

Status
Not open for further replies.
Basically, I want to do some HUD stuff through Lua, where the outcome will be different for split-screen player 1 and player 2.

So far I've tried "if splitscreen==1 and player==0" and "if splitscreen==1 and player==1". Neither worked, so I tried to print the number of the player structure into the console, and found it was a pretty "random" number, which may or may not be different for each map and/or boot-up of the game.

Then I tried "if splitscreen==1 and player==players[0]", which didn't work either. So... does anyone know how to check the number of the player itself?

Yes, I have tried the "V_SNAPTOBOTTOM" video flag. It didn't work for what I want to do.
Edit: And V_SPLITSCREEN won't work either, as I want to draw something at the bottom of the display, not the top, where I'd like it to be at the bottom of the screen in non-split-screen.
 
Last edited:
Well, that works. Thank you a lot. Now I can make split-screen compatible HUD things, if I ever feel like making a HUD thing. Which is nice, considering I have a friend who likes Sonic Robo Blast 2 somewhat, and split-screen is perfect for playing with him.
 
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top