Page 1 of 1
Player model example
Posted: Thu Jul 27, 2006 22:42
by Nash
Just drag and drop this onto GZDoom.exe.
NOTE: I DID NOT MAKE THE MODEL! I "borrowed" it from a Quake 2 mod (If I'm not mistaken, it was the same source of models for Kokak's ZDoomGL). In other words, the model does look like crap.
However, this file's purpose is to demonstrate using player models for GZDoom (as well as how to define a custom player class).
Edit: Reuploaded file
http://nash.wanzafran.com/playermodel.zip
EDIT: I realize the weapon model is missing. I'm trying to figure out how to define more than one model per actor. Also, the crouch animation isn't defined yet, so you'll just see the model get squashed vertically.
As soon as I figure those out, I'll upload the new version.
Posted: Fri Jul 28, 2006 15:06
by Cyrez
Nice work nash.
incase i'm not the only one with mooload issues i mirored the file here
http://csiprojects.com/files/playermodel.zip
Posted: Fri Jul 28, 2006 20:30
by Nash
I can't get crouching to work. Graf, can you tell me what I'm doing wrong here?
DECORATE:
[spoiler]
Code: Select all
ACTOR DoomPlayer_ : DoomPlayer replaces DoomPlayer
{
Game Doom
player.crouchsprite "PLYC"
states
{
Spawn:
NULA A 4
Loop
See:
NULC ABCDEF 4
Loop
Missile:
NULD ABCD 2
goto Spawn
Melee:
NULD EF 4 Bright
NULD GH 4
goto Spawn
Pain:
NULE A 2 A_Pain
NULE ABCD 4
goto Spawn
Death:
NULF A 8
NULF B 8 A_Scream
NULF CDEF 8
NULF G 8 A_NoBlocking
NULF H -1
Stop
}
}
[/spoiler]
MODELDEF:
[spoiler]
Code: Select all
Model DoomPlayer_ // Name of actor in DECORATE
{
Path "models/player" // Path to model in PK3
Model 0 "player.md2" // Model index, model file
Skin 0 "green.pcx" // Model index, texture (can be in any format supported by GZDoom)
Scale 1.2 1.2 1.2 // Scale values
// Standing
Frame NULA A 0 "stand01" // The sprite lump, sprite frame, model index, name of frame
// Running
Frame NULC A 0 "run1"
Frame NULC B 0 "run2"
Frame NULC C 0 "run3"
Frame NULC D 0 "run4"
Frame NULC E 0 "run5"
Frame NULC F 0 "run6"
// Attacking
Frame NULD A 0 "attack1"
Frame NULD B 0 "attack2"
Frame NULD C 0 "attack3"
Frame NULD D 0 "attack4"
Frame NULD E 0 "attack5"
Frame NULD F 0 "attack6"
Frame NULD G 0 "attack7"
Frame NULD H 0 "attack8"
// Pain
Frame NULE A 0 "pain101"
Frame NULE B 0 "pain102"
Frame NULE C 0 "pain103"
Frame NULE D 0 "pain104"
// Death
Frame NULF A 0 "death301"
Frame NULF B 0 "death302"
Frame NULF C 0 "death303"
Frame NULF D 0 "death304"
Frame NULF E 0 "death305"
Frame NULF F 0 "death306"
Frame NULF G 0 "death307"
Frame NULF H 0 "death308"
// Crouching
Frame PLYC A 0 "crwalk1"
Frame PLYC B 0 "crwalk2"
Frame PLYC C 0 "crwalk3"
Frame PLYC D 0 "crwalk4"
}
[/spoiler]
Posted: Fri Jul 28, 2006 21:14
by Graf Zahl
No crouching support for models yet. Sorry.
Posted: Sat Jul 29, 2006 8:13
by Nash
Should I just wait for you to implement proper model support (in other words, ZDoom 2.2.0) before I even bother doing all this player model stuff?