Quantcast
Channel: ZDoom
Viewing all articles
Browse latest Browse all 3391

Scripting • Re: 3D Weapon Model Falling Through Floor And Not Appearing When Selected

$
0
0
Are your offsets set correctly?
Show code of the weapon actor and the modeldef. If possible, share the file.

In decorate/zscript of the weapon, how are the frames called? Remember that while you can assign model animation frames to sprites, the sprites has to be also existing in the file, at least as definition in TEXTURES lump. Bit without the sprites the sole modeldef will not work.

How is your spawn state for the weapon defined? If you have done something like:
WEAP A 1
Stop
The weapon will dissappear after one tic, because it's defined to exist only one tic. To make it stay, change "1" to "-1".
But without seeing your code, it's pretty hard to give any advice...
My apologies, I knew I'd have to give up code, so I'll just paste the MODELDEF and the DECORATE until I can find out how to link the PK3 lol

The MODELDEF:

Code:

Model AXE {Path "models/weapons/axe"Model 0 "mdl_axe.md3"Scale 1 1 1Offset 1 1 1AngleOffset 0SurfaceSkin 0 0 "skins/skin0.png"FrameIndex HTCH A 0 0FrameIndex HTCH B 0 1FrameIndex HTCH C 0 2FrameIndex HTCH D 0 3FrameIndex HTCH E 0 4FrameIndex HTCH F 0 5FrameIndex HTCH G 0 6FrameIndex HTCH H 0 7FrameIndex HTCH I 0 8FrameIndex HTCH J 0 9}
The DECORATE:

Code:

Actor Axe : Weapon {Weapon.SelectionOrder 350Weapon.SlotNumber 1States {Spawn:HTCH A -1StopSelect:HTCH B 1 A_RaiseLoopReady:HTCH B 1 A_WeaponReadyLoopDeselect:HTCH B 1 A_LowerLoopFire:HTCH BCDEFB 1Goto ReadyAltFire:HTCH GHIJAB 1Goto Ready}}
I'll likely follow up with the IPK3 itself, but thank you, and apologies for lack of info

Statistics: Posted by milkFiend — Wed Mar 13, 2024 5:04 pm



Viewing all articles
Browse latest Browse all 3391

Trending Articles