[ZScript] Quake-style movement - v2.0.2

Post your example zscripts/ACS scripts/etc here.
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.
User avatar
StroggVorbis
Posts: 866
Joined: Wed Nov 08, 2017 4:23 pm
Graphics Processor: nVidia with Vulkan support
Location: Germany

Re: [ZScript] Quake-style movement

Post by StroggVorbis »

dodopod wrote:Bugfix release. v2.0 accidentally used a few ZScript functions that only exist in GZDoom v3.8. This release removes those references. See the first post for downloads.
v3.8? You mean the 4.0.0 pre release?
SuperAble
Posts: 38
Joined: Tue Jan 02, 2018 9:04 pm

Re: [ZScript] Quake-style movement

Post by SuperAble »

Basically copied all of the files from the one that is made for Doom1/Doom2 to my PK3 mod, and changed "PhobosPlayer" into "TestPlay" from the zscript.zc, yet it failed.
User avatar
Mini--Joe
Posts: 97
Joined: Sun Jul 27, 2014 10:25 am

Re: [ZScript] Quake-style movement

Post by Mini--Joe »

How do I get the air-control that is defined in Mapinfo in my mod to work with this?
User avatar
StroggVorbis
Posts: 866
Joined: Wed Nov 08, 2017 4:23 pm
Graphics Processor: nVidia with Vulkan support
Location: Germany

Re: [ZScript] Quake-style movement

Post by StroggVorbis »

@dodopod

Are you sure that normforward- & sidemove are the same?
You just changed the latter from 0x18 (24) to 0x14 (20), Siderun and forwardwalk-/run still default to 0x28 (46), 0x19 (25) & 0x32 (50) respectively.
dodopod
Posts: 66
Joined: Wed Oct 04, 2017 2:00 pm

Re: [ZScript] Quake-style movement

Post by dodopod »

They aren't. I only made sure that the walk value is half of the run value (0x28 is 40, not 46).
User avatar
StroggVorbis
Posts: 866
Joined: Wed Nov 08, 2017 4:23 pm
Graphics Processor: nVidia with Vulkan support
Location: Germany

Re: [ZScript] Quake-style movement

Post by StroggVorbis »

Oh right, my bad :P
dodopod
Posts: 66
Joined: Wed Oct 04, 2017 2:00 pm

Re: [ZScript] Quake-style movement - v2.0.2

Post by dodopod »

I've just released v2.0.2, which makes the GZDoom v3.8 branch (which really works with v4.x, as well) the main release, and fixes a bug when swimming.

See the release notes here.
SuperAble
Posts: 38
Joined: Tue Jan 02, 2018 9:04 pm

Re: [ZScript] Quake-style movement - v2.0.2

Post by SuperAble »

Tried Implementing the 2.0.2 version for my mod, got a fatal error when loading it up.
Here's what I did:
1. Downloaded the "quake-move-v2.0.2.pk3" file to my GZDoom directory and renamed it to: "MVNT.pk3"
2. Go to my Total Conversion project (a pk3 file too) and made a decorate for a custom Player:

Code: Select all

Actor TestPlayer : QuakePlayer
{
	Health 100
	Player.DisplayName "Testing"
}
3. Went to my GAMEINFO code and added in:

Code: Select all

LOAD = "MVNT.pk3"
4. Saved the TC and attempted to load it into GZDoom, got these errors about script warnings for "handlers", then a fatal error when it finally attempted to run the TC:
Capture.PNG
Capture2.PNG
You do not have the required permissions to view the files attached to this post.
dodopod
Posts: 66
Joined: Wed Oct 04, 2017 2:00 pm

Re: [ZScript] Quake-style movement - v2.0.2

Post by dodopod »

For me, I can get it to work if I change the Actor definition to:

Code: Select all

Actor TestPlayer : QuakePlayer
{
   Health 100
   Player.DisplayName "Testing"
   Player.StartItem "Fist"
}
Substitute whatever weapon you want. The same thing happens if I run it without QuakeMove, and make TestingPlayer inherit from PlayerPawn, so I think this is a GZDoom thing.

Responding to your PM, yes, you can put all the files from quake-move-v2.0.2.pk3 into your own PK3. Just create your own player class inheriting from QuakePlayer, like you did.
dodopod
Posts: 66
Joined: Wed Oct 04, 2017 2:00 pm

Re: [ZScript] Quake-style movement - v2.0.2

Post by dodopod »

I just realized the "doom mod" build didn't actually work. That's fixed, now. Then I realized I accidentally included footstep sounds from Quake 3. These have been changed to OpenArena SFX.
SuperAble
Posts: 38
Joined: Tue Jan 02, 2018 9:04 pm

Re: [ZScript] Quake-style movement - v2.0.2

Post by SuperAble »

dodopod wrote:I just realized the "doom mod" build didn't actually work. That's fixed, now. Then I realized I accidentally included footstep sounds from Quake 3. These have been changed to OpenArena SFX.
Here's the Complete placeholder/testing code:

Code: Select all

Actor TestPlayer : QuakePlayer
{
	Health 100
	Player.DisplayName "TestPlayer"
	Player.CrouchSprite "PLYC"
	Player.StartItem "Fist"
	Player.WeaponSlot 1, "Fist", "Chainsaw"
	Player.WeaponSlot 2, "Pistol"
	Player.WeaponSlot 3, "Shotgun", "SuperShotgun"
	Player.WeaponSlot 4, "Chaingun"
	Player.WeaponSlot 5, "RocketLauncher"
	Player.WeaponSlot 6, "PlasmaRifle"
	Player.WeaponSlot 7, "BFG9000"
	States
	{
	Spawn:
		PLAY A -1
		Loop
	See:
		PLAY ABCD 5
		Loop
	Missile:
		PLAY E 12 
		Goto Spawn
	Melee:
		PLAY F 6 Bright
		Goto Missile
	Pain:
		PLAY G 4
		PLAY G 4 A_XScream
		Goto Spawn
	Death:
		PLAY H 12
		PLAY I 12 A_PlayerScream
		PLAY J 12 A_NoBlocking
		PLAY KLM 12
		PLAY N -1
		Stop
	XDeath:
		PLAY O 6
		PLAY P 6 A_XScream
		PLAY Q 6 A_NoBlocking
		PLAY RSTUV 6
		PLAY W -1
		Stop
	Crush:
		POL5 A -1 A_XScream
		Stop
	}
}
Still got the same errors about the handlers and fatal error upon the port attempting to load the pk3.

P.S.
What's with the handlers anyway?
dodopod
Posts: 66
Joined: Wed Oct 04, 2017 2:00 pm

Re: [ZScript] Quake-style movement - v2.0.2

Post by dodopod »

Did you remember to add the player class in MAPINFO?

Edit: Also the handler warnings don't matter. That's just because I use a float as an int, somewhere.
SuperAble
Posts: 38
Joined: Tue Jan 02, 2018 9:04 pm

Re: [ZScript] Quake-style movement - v2.0.2

Post by SuperAble »

dodopod wrote:Did you remember to add the player class in MAPINFO?

Edit: Also the handler warnings don't matter. That's just because I use a float as an int, somewhere.

Code: Select all

GameInfo
{
	PlayerClasses = "TestPlayer"
	AddEventHandlers = "DamageKickHandler", "LandKickHandler", "WeaponLagHandler", "SpeedometerHandler", "StrafejumpHandler"
	NormForwardMove = 0x19, 0x32
	NormSideMove = 0x14, 0x28
}
Result:
Still having the same Script Warning about the Damage_Kick_Handler (line 13) and Land_Kick_Handler (Line 25)-- probably leading to still cause the Fatal Error message to pop up.

Used GZDoom 4.1.2, The Quake Movement that's ready for use for Doom 1 and 2 (Version 2.0.1) ran with no issues. This latest one, that's the only problem: something's up with lines 13 and 25 on those handlers.

UPDATE:
Turns out that it's probably something with transferring and merging the files over to my TC project pk3 and working from there. It works if were to have two separate files: one for the TC and one holding the ZScript Quake Movements (The GAMEINFO on the main TC file will call to load the Quake Movement pk3 file).

But I'm trying to find a way where I can move over the components of the Quake Movement pk3 onto my TC project making it an all-in-one deal without having it to call and load for a separate pk3.
Mr.Doot
Posts: 1
Joined: Tue Aug 13, 2019 6:18 am

Re: [ZScript] Quake-style movement - v2.0.2

Post by Mr.Doot »


I dunno, maybe I'm doing something wrong, but I'm getting this weird glitch, the weapons keep lowering down for a second after shooting. Running the latest version of the mod on GzDoom 4.2.0.
Is there some sort of work around for this? :mrgreen:
Last edited by Blue Shadow on Tue Aug 13, 2019 6:49 am, edited 1 time in total.
Reason: Fixed video link.
User avatar
Ryan Cordell
Posts: 4349
Joined: Sun Feb 06, 2005 6:39 am
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia (Modern GZDoom)
Location: Capital of Explodistan

Re: [ZScript] Quake-style movement - v2.0.2

Post by Ryan Cordell »

There's also a rather bizarre bug involving saving/loading with this. I used BTSX E1 Map02 for this test, but any should do.

When you load in, have jumping and crouching enabled once you're in a map. Maybe move around a bit. Then save, exit out of (G)ZDoom entirely, and then bring it again and load the save game. Jumping and landing will then make the player into what is effectively a Diglet and the only way to fix it in-game is to have the sprite come back down into its normal position and then crouching.

Despite it it's still a rather satisfying mod to use!

Return to “Script Library”