Two questions, possibly lua-related

Status
Not open for further replies.

B*Dragon514

Member
So, yeah, as the title says, I have two questions which may/may not require lua scripts:

1) In older versions of SRB2, one would use NumEmblems in the MAINCFG category to give the user a visual indicator of how many emblems there are total in the game. In this version, I've noticed that the game automatically calculates that number for you, thus removing NumEmblems. Is it possible to use lua to force that number to a certain value? Say I had, for example, 30/30 emblems for a mod, but there was some super secret level which pushed the number to 35/30. Could it be possible to set the second value to a fixed number?

2) I know that you can prevent a character from being playable in SP by not including an OBJCTCFG for that character. Is it at all possible to prevent that character from being used or at least hidden in multiplayer? The only reason I ask is so I could add a hidden character in the game which could only be played as in a hidden rotation of maps in SP through forceskin.

Any and all help would be greatly appreciated :)
 
1) Not that I know of, no.

2) The only method I can think of is to check each player's skin in a ThinkFrame hook and if it matches that character's name, set it to something else. (You'll have to adjust the skin-related values back manually, since just changing the skin name leaves you with i.e. thokking Tails.) You'd have to add a check that disables the behavior on the hidden maps, though. The end result would be pretty hacky (you'd still be able to select the hidden character, just not play as them) but it'd do the job decently.
 
Darn. I wish the NumEmblems variable was carried over from the older versions, but I'm sure there was good reasoning behind ditching it.

Hmm, the character thing sounds like it may be more trouble than it's worth. I may give it a shot anyway, but if I can't get it to work the way I intend, then I'll probably just cut my losses and forget about the multiplayer checking.

Anyway, thanks for your help :)
 
Status
Not open for further replies.

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

Back
Top