ACS command to get the player's skin

Moderator: GZDoom Developers

Post Reply
User avatar
Enjay
 
 
Posts: 27627
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

ACS command to get the player's skin

Post by Enjay »

I have mentioned wanting this before but I don't *think* it has ever actually been requested.

Is it possible to have a method for ACS to interrogate the player's skin and return the skin name (or some other variable that could be used to identify the skin)?

Why? Because "scripted marines" are ideal for using as player replacements during cutscenes because they can easily be given targets and patrol paths etc whereas the player cannot. It is already possible to transfer the player's colours to the scripted marine to make him look like the player but if the player is also using a custom skin, the illusion breaks down.

One of the times that this was discussed before, Chris explained what seems like the main problem behind this...
Chris wrote:You can't retrieve strings in an ACS script. It has to be a number, and there's no meaning way to get a skin name by number.

However.. I do kind of have an idea. If the last string table entry (255?) is reserved solely for the game engine to modify, then that could allow for ACS functions to "return" strings (though it'd actually just modifying the last string table entry). However, it would be limited by the fact that the "returned" string won't stay around. Of course, we'd also need string compare functions(strcmp, stricmp, ect, maybe even strchr and strstr; those those last two would only be able to return true or false).
However, if there is a way around this, it would be a really nice feature to have.

Thanks.
User avatar
Siggi
Posts: 3288
Joined: Sun Oct 03, 2004 8:57 am
Preferred Pronouns: They/Them
Location: South Africa

Re: ACS command to get the player's skin

Post by Siggi »

Surely an option to have a scripted marine inherit the skin of the player along with the colour is doable?
It'd be less generalized than the original request, but it would probably work around the string issue and I think solve Enjay's scripted marine situation.
User avatar
Enjay
 
 
Posts: 27627
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: ACS command to get the player's skin

Post by Enjay »

Certainly, if that was available it would cover anything that I have ever wanted it for.
Watermelon
Posts: 36
Joined: Thu Jan 19, 2012 11:43 am

Re: ACS command to get the player's skin

Post by Watermelon »

You might be able to force it with ConsoleCommand("skin asd"); if you want one.
Though you may not want this
User avatar
Enjay
 
 
Posts: 27627
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: ACS command to get the player's skin

Post by Enjay »

That's a SkullTag only feature and I'm not using SkullTag.
Watermelon
Posts: 36
Joined: Thu Jan 19, 2012 11:43 am

Re: ACS command to get the player's skin

Post by Watermelon »

Actually you reminded me that I wanted to post a thread on Strings for ZDoom, if it gets added that may be a step in the right direction :)
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”