Page 1 of 1

3D model weapon rotate

Posted: Mon Jan 07, 2008 20:34
by Azure Agony
Hi! I wasn't sure where I should post this question, cause it's not a bug in game. I got problem/question, I made weapon 3D model and when I summon it on map it's rotating (like in quake). Can I disable rotating for weapons? (it's good for deathmatch not for place where it shuold lies and wait for player).
Thanks!

Posted: Tue Jan 08, 2008 0:50
by Enjay
Can you post your modeldef? I've just tried a few examples and the only ones that rotate are the ones that specifically say "ROTATING" in the modeldef. Everything I tried was a weapon, so it's not just because your item is one.

Posted: Tue Jan 08, 2008 9:16
by Nash
Did you make sure to define only one frame for the model? Though this is very unlikely, the model could have been rotate-animated by hand and because you defined all of the frames in the MODELDEF, GZDoom happily animates the model...

Posted: Tue Jan 08, 2008 15:40
by Azure Agony
Ok, here it is:
MODELDEF

Model AXE
{
Path "models"
Model 0 "FIREAXE.md3"
Skin 0 "FIREAXE.jpg"
Scale 0.25 0.25 0.25

FrameIndex POSS A 0 0
}
-------------------------------------

And here is decorate for this model:

ACTOR AXE: Fireaxe 20146
{

States
{
Spawn:
POSS A -1
Stop
}
}
--------------------------------------
And here is decorate for weapon:

ACTOR Fireaxe : Weapon
{
Weapon.SelectionOrder 3700
Inventory.PickupMessage "YOU GOT THE FIREAXE!"
Inventory.PickupSound "Pickup"
Weapon.Kickback 100
decal axehitchip
Obituary "AXE MURDERED!!!"
+WEAPON.WIMPY_WEAPON
+WEAPON.MELEEWEAPON
States
{
Ready:
FAXE A 1 A_WeaponReady
Loop
Deselect:
FAXE A 1 A_Lower
Loop
Select:
FAXE A 1 A_Raise
Loop
Fire:
FAXE B 3 A_PlaySoundEx("weapons/axeswing","Weapon",0)
FAXE C 4
FAXE D 12 A_CustomPunch(30,1,0,"AxeHitPuff")
FAXE C 5
FAXE B 5
FAXE A 5
Goto Ready
Altfire:
FAXE E 2 A_PlaySoundEx("weapons/axewhoosh","Weapon",0)
FAXE F 3
FAXE G 8 A_CustomPunch(22,1,0,"AxeHitPuff")
FAXE F 5
FAXE E 5
FAXE A 5
Goto Ready
//Normally for sprite weapon here is smth like this:
// Spawn:
// AXE1 A -1
// Stop
//For 3d model I don't use it (and it works)
}
}
---------------------------------------------------
If any 3D model type is weapon it start to rotate.

Posted: Tue Jan 08, 2008 22:36
by Enjay
Well, I can't see anything obvious in there. You say it happens for any model you set to be a 3D model. There isn't a global setting of "weapon rotate" or something is there? I couldn't see one, but that doesn't mean it isn't there.

And just a double check, this is GZdoom as opposed to Skulltag or something which may have additional options?


And purely out of interest, why do you define a new actor with a spawn state for the model? You could just set up your actor to use the weapon's normal spawn state and the AXE1 sprite instead of POSS and make the modeldef reference the Fireaxe actor instead of Axe.

Posted: Wed Jan 09, 2008 7:04
by Azure Agony
No, no it happens for models with WEAPON state (others models work fine). Yes, I was thinking about look into the skulltag. About model define it's true :) new actor is needless (I forgot about that, thanks for remind) :)

Posted: Thu Jan 10, 2008 22:04
by Azure Agony
I still didn't find resolve this problem (but I got idea to make it with scripts and fake item).

Posted: Fri Jan 11, 2008 0:14
by Enjay
That really shouldn't be necessary. The model shouldn't be rotating unless you've told it to. So somehow something must be set somewhere to make that the case. Unfortunately, I'm all out of clues as to why it's happening. :(

Would you be able to package up a very small sample PK3 with the model in it plus its associated decorate and modeldef so that others could load it up and see what happens on their system?

Posted: Fri Jan 11, 2008 14:28
by Azure Agony
Oh my Goodness, I found what was wrong! :D I started GZDoom today, summoned Axe and... it doesn't rotate! I said what the hell? :) Then (about 2 hours later) my friend call me and tell that he installed old version of GZDoom (few days ago) to take screenshots from map and he forgot to reinstal GZDoom 1.0.30, and he did it just today morning! :D:D
But, I have to say it: THANKS FOR ALL HELP GUYS!!!