Weapon Sway problems (Help needed to fix it)

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!)
Post Reply
User avatar
Niphura
Posts: 192
Joined: Fri Jun 16, 2017 3:07 pm
Location: Argentina

Weapon Sway problems (Help needed to fix it)

Post by Niphura »

I have no knowledge of acs codes so I have tried to extract decorates and the acs file from the project brutality 3.0 sway and implement all that in a random weapon. but the weapon does not appear on the map. Can someone help me achieve this effect? https://www.youtube.com/watch?v=4wPAzut ... =Alexandra or at least can tell me what my mistake was? :?

Here is the random weapon with the decorates and acs: http://www.mediafire.com/file/6u8givqxk ... 2+Sway.pk3
User avatar
ramon.dexter
Posts: 1520
Joined: Tue Oct 20, 2015 12:50 pm
Graphics Processor: nVidia with Vulkan support
Location: Kozolupy, Bohemia

Re: Weapon Sway problems (Help needed to fix it)

Post by ramon.dexter »

The main problem is that you put the graphics&sound into markers, yet you are using pk3. Pk3 doesn't use markers. Basically, pk3 IS a an zip archive. So you can use folders instead of markers.

Look here to learn how to ues pk3 properly: https://zdoom.org/wiki/Using_ZIPs_as_WAD_replacement

The file is fine. The only thing I could advice you with the sway is the modification of ready state:

Code: Select all

Ready:    
	AA12 A 1 
			{
				A_WeaponReady;
				A_WeaponOffset(CallACS("Script_GetGunOffsetX"), CallACS("Script_GetGunOffsetY"),WOF_KEEPY);
			}
    Goto Ready
User avatar
Niphura
Posts: 192
Joined: Fri Jun 16, 2017 3:07 pm
Location: Argentina

Re: Weapon Sway problems (Help needed to fix it)

Post by Niphura »

ramon.dexter wrote:The main problem is that you put the graphics&sound into markers, yet you are using pk3. Pk3 doesn't use markers. Basically, pk3 IS a an zip archive. So you can use folders instead of markers.

Look here to learn how to ues pk3 properly: https://zdoom.org/wiki/Using_ZIPs_as_WAD_replacement

The file is fine. The only thing I could advice you with the sway is the modification of ready state:

Code: Select all

Ready:    
	AA12 A 1 
			{
				A_WeaponReady;
				A_WeaponOffset(CallACS("Script_GetGunOffsetX"), CallACS("Script_GetGunOffsetY"),WOF_KEEPY);
			}
    Goto Ready
thanks for all the information! now it works perfectly, just in case you do not know how to make enemies fly in the air when you shoot them with a shotgun or any other weapon? If so, can you tell me how to do it?
User avatar
ramon.dexter
Posts: 1520
Joined: Tue Oct 20, 2015 12:50 pm
Graphics Processor: nVidia with Vulkan support
Location: Kozolupy, Bohemia

Re: Weapon Sway problems (Help needed to fix it)

Post by ramon.dexter »

Honestly, I can imagine that could be done either with ACS or zscript and MAYBE in decorate. BUT right now I really dont know how to do it.
Bael
Posts: 19
Joined: Sat Dec 02, 2017 3:15 pm

Re: Weapon Sway problems (Help needed to fix it)

Post by Bael »

ramon.dexter wrote:Honestly, I can imagine that could be done either with ACS or zscript and MAYBE in decorate. BUT right now I really dont know how to do it.
Excuse me Ramon, can you tell me what i do wrong here? I tried to add casings to a random weapon and I succeeded but now I can't hear the attack sound of the gun can you tell me what I did wrong? http://www.mediafire.com/file/293vvsm3f ... asings.pk3
Post Reply

Return to “Scripting”