1) The AngleOffset parameter in MODELDEF does nothing in my case.(works for other models)
2) If I put
Code: Select all
METE A 0 A_SetAngle (90+Angle, 0, AAPTR_DEFAULT)
To Combat This, I've rotated the model itself in Blender by 90 degrees and it's ok now, although AO still doesn't change the angle as it should. Now for the actual problem
3)The Pitch. No matter what, A_SetPitch or PitchOffset don't work. At all. The projectile is always flat.
I will post the relevant code below.
The Objective: To make the missile adjust angle and pitch constantly as it's moving.
However, I don't know how, or why pitching doesn't seem to work.
Modeldef:
Code: Select all
Model Meteor
{
Path "Models/Meteor"
Model 0 "meteor.md3"
scale 50 50 50
frameindex METE A 0 0
AngleOffset 90 //Does nothing
}
Code: Select all
ACTOR Meteor
{
Radius 4
Height 2
Projectile
Speed 30
Damage (random (340, 350))
DamageType Explosive
MeleeDamage 0
Scale 0.5
Decal "Scorch"
Projectile
+MISSILE
+NOGRAVITY
+EXTREMEDEATH
+BLOODSPLATTER
+THRUSPECIES
+MTHRUSPECIES
+SPECTRAL
+SEEKERMISSILE
SeeSound "weapons/RLL"
DeathSound "Explosion"
Obituary "$OB_MPROCKET"
Species "Marines"
States
{
Spawn:
TNT1 A 0
TNT1 A 1 A_PlaySound("PAC/PACFIR", 6, 1.0)
// METE A 0 A_SetPitch (sin(momz)/cos(momx), 0, AAPTR_DEFAULT)
METE A 0 A_SetPitch (-45, 0, AAPTR_DEFAULT)
// METE A 0 A_SetAngle (90+Angle, 0, AAPTR_DEFAULT)
METE A 1 BRIGHT A_CustomMissile("RocketBackblast", 0, 0, 180, 2, 0+pitch)
METE A 1 Bright
METE AAAAA 1 A_SpawnItem("RocketFlare",-20,0)
METE AAAAA 1 A_SpawnItem ("OldschoolRocketSmokeTrail2")
METE AAAAA 1 A_CustomMissile ("OldschoolRocketSmokeTrail2", 2, 0, random (160, 210), 2, random (-30, 30))
Goto Seek
Seek:
TNT1 A 0
METE AAAAAA 0 A_SpawnItem("RocketFlare",-20,0)
METE AAAAAA 0 A_SpawnItem ("OldschoolRocketSmokeTrail2")
METE AAAAAA 0 A_CustomMissile ("OldschoolRocketSmokeTrail2", 2, 0, random (160, 210), 2, random (-30, 30))
METE A 0 A_PlaySound("PAC/PACMIS", 7, 1.0)
Goto SMissile
Smissile:
TNT1 A 0 A_Tracer2
METE A 0 A_FaceTracer(0, 0, 0, 0, FAF_TOP)
// METE A 0 A_SetPitch (45-pitch, 0, AAPTR_DEFAULT)
METE A 1 A_SeekerMissile(7, 11, SMF_PRECISE)
METE A 0 A_SpawnItem("RocketFlare",-20,0)
METE A 0 A_SpawnItem ("OldschoolRocketSmokeTrail2")
METE A 0 A_CustomMissile ("OldschoolRocketSmokeTrail2", 2, 0, random (160, 210), 2, random (-30, 30))
METE A 0 Bright A_ScaleVelocity(1.55)
Loop