Can Lua read the handicap?

Can Lua read the handicap?

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Can Lua read the handicap?

Post by zwzsg »

Can Lua read the handicap that each player set to himself?

Basically, I want to catch the use of the handicap button, to then implemement my own Lua gadget handicap code. Which has nothing to do with metal (it's for a mod in which metal is irrelevant).

Nemo suggested comparing a player's income to a calculated level, but, that sounds like a dirty workaround, which wouldn't work on a metal less map.

So I just hope someone will tell me about an undocumenated Spring.GetTeamHandicap
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Can Lua read the handicap?

Post by lurker »

The way to do it not-so-dirty is to set their resources to 0, add 100, measure them, and then set them back to normal. I think. I don't know about your question, though.
Post Reply

Return to “Lua Scripts”