Is it possible to do this strife selection menu in doom?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
User avatar
Niphura
Posts: 192
Joined: Fri Jun 16, 2017 3:07 pm
Location: Argentina

Is it possible to do this strife selection menu in doom?

Post by Niphura »

As the title says I would like to know if you can make a menu like this: https://www.youtube.com/watch?v=1li80fG ... roductions
in which when you press a number you choose a weapon for the slotnumber
User avatar
ramon.dexter
Posts: 1562
Joined: Tue Oct 20, 2015 12:50 pm
Graphics Processor: nVidia with Vulkan support
Location: Kozolupy, Bohemia

Re: Is it possible to do this strife selection menu in doom?

Post by ramon.dexter »

With ACS, not a problem. How, that's the question :wink:
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed

Re: Is it possible to do this strife selection menu in doom?

Post by wildweasel »

I wonder if GleasSpty's Weapon Wheel may be of use to you as a base. Don't know about manual slot assignment, though. In both cases you'd probably have to contact whoever made those projects to figure out how it got done.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49211
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Is it possible to do this strife selection menu in doom?

Post by Graf Zahl »

It should be doable to implement a weapon slot editor in ZScript, the only thing that'd require native support is saving them to the config. At the moment this needs to be done manually by copy/paste.
User avatar
Niphura
Posts: 192
Joined: Fri Jun 16, 2017 3:07 pm
Location: Argentina

Re: Is it possible to do this strife selection menu in doom?

Post by Niphura »

Is there any way to select another weapon without raising or lower the weapon? i want that the other weapon just appears instead of the other when you press the slotnumber of the weapon
User avatar
gwHero
Posts: 360
Joined: Mon May 08, 2017 3:23 am
Graphics Processor: Intel with Vulkan/Metal Support
Location: The Netherlands

Re: Is it possible to do this strife selection menu in doom?

Post by gwHero »

Niphura wrote:Is there any way to select another weapon without raising or lower the weapon? i want that the other weapon just appears instead of the other when you press the slotnumber of the weapon
ACS:

Code: Select all

SetPlayerProperty (0, 1, PROP_INSTANTWEAPONSWITCH);
ZScript

Code: Select all

PlayerInfo player = players[consoleplayer];
if (player.cheats & CF_INSTANTWEAPSWITCH == false)
	player.cheats |= CF_INSTANTWEAPSWITCH;  // add flag
User avatar
Niphura
Posts: 192
Joined: Fri Jun 16, 2017 3:07 pm
Location: Argentina

Re: Is it possible to do this strife selection menu in doom?

Post by Niphura »

gwHero wrote:
Niphura wrote:Is there any way to select another weapon without raising or lower the weapon? i want that the other weapon just appears instead of the other when you press the slotnumber of the weapon
ACS:

Code: Select all

SetPlayerProperty (0, 1, PROP_INSTANTWEAPONSWITCH);
ZScript

Code: Select all

PlayerInfo player = players[consoleplayer];
if (player.cheats & CF_INSTANTWEAPSWITCH == false)
	player.cheats |= CF_INSTANTWEAPSWITCH;  // add flag
I know you probably will not, but could you please apply it to this weapon?
http://www.mediafire.com/file/bbsgu583y ... utogun.wad I am a noob in acs
User avatar
gwHero
Posts: 360
Joined: Mon May 08, 2017 3:23 am
Graphics Processor: Intel with Vulkan/Metal Support
Location: The Netherlands

Re: Is it possible to do this strife selection menu in doom?

Post by gwHero »

Here you go :)

EDIT: I forgot you asked for this weapon only; I applied it as a common feature.
Do you want that it's only done when the player is carrying the autogun? Anyway, you now have ACS as a start.
You do not have the required permissions to view the files attached to this post.
User avatar
Niphura
Posts: 192
Joined: Fri Jun 16, 2017 3:07 pm
Location: Argentina

Re: Is it possible to do this strife selection menu in doom?

Post by Niphura »

gwHero wrote:Here you go :)

EDIT: I forgot you asked for this weapon only; I applied it as a common feature.
Do you want that it's only done when the player is carrying the autogun? Anyway, you now have ACS as a start.
Good job! well, my idea was to make a weapon wheel that works in the following way:
When you select a weaponslot (slot 1,2,3...) the weapon does not lower or raise but instead, when selecting a certain weapon, a default weapon sprite appears (in which the weapon wheel appears) only for a 1 second and then the sprite of the default weapon appears without the weaponwheel and ready to use ... I do not know if you understood :lol: as you can see it is a more a visual than functional thing, I do not want to select the weapon using the weaponweel. the weapon will be selected from the keyboard normally
User avatar
gwHero
Posts: 360
Joined: Mon May 08, 2017 3:23 am
Graphics Processor: Intel with Vulkan/Metal Support
Location: The Netherlands

Re: Is it possible to do this strife selection menu in doom?

Post by gwHero »

If I understand you correctly, that would not be to difficult.
In Decorate, when the weapon is selected, jump to a custom state that shows a weapon wheel hud sprite during 35 tics, and after that just goto the ready state. It can be done in many ways, but I think this is an easy way to do it.
User avatar
Niphura
Posts: 192
Joined: Fri Jun 16, 2017 3:07 pm
Location: Argentina

Re: Is it possible to do this strife selection menu in doom?

Post by Niphura »

gwHero wrote:If I understand you correctly, that would not be to difficult.
In Decorate, when the weapon is selected, jump to a custom state that shows a weapon wheel hud sprite during 35 tics, and after that just goto the ready state. It can be done in many ways, but I think this is an easy way to do it.
Could you give me an example of how the state of the weapon would look in Decorate?
User avatar
gwHero
Posts: 360
Joined: Mon May 08, 2017 3:23 am
Graphics Processor: Intel with Vulkan/Metal Support
Location: The Netherlands

Re: Is it possible to do this strife selection menu in doom?

Post by gwHero »

It's even more easy, you don't have to leave the Select state. Add a sprite that represents the wheel, i.e. WHEEA0 and change the code in the Select state:

Code: Select all

Select:  
    WHEE A 35		// shows the wheel for 35 tics
    TNT1 A 0 A_Raise	// will be done once because of PROP_INSTANTWEAPONSWITCH
    loop
User avatar
Niphura
Posts: 192
Joined: Fri Jun 16, 2017 3:07 pm
Location: Argentina

Re: Is it possible to do this strife selection menu in doom?

Post by Niphura »

gwHero wrote:It's even more easy, you don't have to leave the Select state. Add a sprite that represents the wheel, i.e. WHEEA0 and change the code in the Select state:

Code: Select all

Select:  
    WHEE A 35		// shows the wheel for 35 tics
    TNT1 A 0 A_Raise	// will be done once because of PROP_INSTANTWEAPONSWITCH
    loop

I'm just curious, is there any way to put a fixed sprite under the sprite of the weapon raising up?
User avatar
gwHero
Posts: 360
Joined: Mon May 08, 2017 3:23 am
Graphics Processor: Intel with Vulkan/Metal Support
Location: The Netherlands

Re: Is it possible to do this strife selection menu in doom?

Post by gwHero »

Niphura wrote:I'm just curious, is there any way to put a fixed sprite under the sprite of the weapon raising up?
I suppose you could this with overlays, but personally I've never used that before.
User avatar
Niphura
Posts: 192
Joined: Fri Jun 16, 2017 3:07 pm
Location: Argentina

Re: Is it possible to do this strife selection menu in doom?

Post by Niphura »

gwHero wrote:
Niphura wrote:I'm just curious, is there any way to put a fixed sprite under the sprite of the weapon raising up?
I suppose you could this with overlays, but personally I've never used that before.
Do you know any mod, or .wad that uses overlays? or do you know tutorials?

Return to “Scripting”