So I've been trying to figure out how to give my Urge a lunch attack with his sword. I have something that kinda works, but it's very buggy and I'm not sure why. Can anyone help me fix this or suggest a different method? Below is the code for my Urge as well as a video demonstration of his buggy lunge attack.
Actor Urge 1996
{
Scale 0.7
Health 500
Speed 30
Radius 20
Height 64
Mass 320
Painchance 50
MeleeRange 256
+FLOORCLIP
+DONTHURTSPECIES
+GHOST
+MISSILEMORE
MONSTER
SeeSound "urge/see"
PainSound "urge/pain"
DeathSound "urge/death"
DropItem RocketAmmo
Obituary "An Urge dynamited %o to bits!"
HitObituary "%o was gutted by an Urge!"
States
{
Spawn:
TNT1 A 1 A_Look
Loop
See:
URSP A 3
URSP BCDEFGHIJK 3
Goto Chase
Chase:
URGE A 0 A_PlaySound ("urge/walk")
URGE AB 5 A_Chase
URGE C 0 A_PlaySound ("urge/walk")
URGE CD 5 A_Chase
Loop
Melee:
UAT2 A 3 A_FaceTarget
UAT2 B 3 A_SkullAttack
UAT2 C 3 A_SkelWhoosh
UAT2 DE 3 A_FaceTarget
UAT2 F 3 A_CustomMeleeAttack(random(1, 10) * 6, "urge/hit")
Goto Chase
Missile:
UAT1 ABC 2 A_FaceTarget
TNT1 A 0 A_ThrowGrenade("UrgeTNT", 15, 15, 5)
TNT1 A 0 A_StopSound
TNT1 A 0 A_PlaySound("skeleton/swing")
UAT1 DEF 2
UAT1 ABC 2 A_FaceTarget
TNT1 A 0 A_ThrowGrenade("UrgeTNT", 15, 15, 5)
TNT1 A 0 A_StopSound
TNT1 A 0 A_PlaySound("skeleton/swing")
UAT1 DEF 2
UAT1 ABC 2 A_FaceTarget
TNT1 A 0 A_ThrowGrenade("UrgeTNT", 15, 15, 5)
TNT1 A 0 A_StopSound
TNT1 A 0 A_PlaySound("skeleton/swing")
UAT1 DEF 2
Goto Chase
Pain:
URGP A 15 A_Pain
Goto Chase
Death:
UDED A 4 A_ScreamAndUnblock
UDED BCDEFGHIJKLMN 3
UDED O -1
Idle:
URSP K 3 A_PlaySound ("urge/see")
URSP JIHGFEDCBA 3
Goto Spawn
Raise:
UDED NMLKJIHGFEDCB 3
UDED A 4
Goto Chase
}
}
Question
asd1994
So I've been trying to figure out how to give my Urge a lunch attack with his sword. I have something that kinda works, but it's very buggy and I'm not sure why. Can anyone help me fix this or suggest a different method? Below is the code for my Urge as well as a video demonstration of his buggy lunge attack.
Actor Urge 1996
{
Scale 0.7
Health 500
Speed 30
Radius 20
Height 64
Mass 320
Painchance 50
MeleeRange 256
+FLOORCLIP
+DONTHURTSPECIES
+GHOST
+MISSILEMORE
MONSTER
SeeSound "urge/see"
PainSound "urge/pain"
DeathSound "urge/death"
DropItem RocketAmmo
Obituary "An Urge dynamited %o to bits!"
HitObituary "%o was gutted by an Urge!"
States
{
Spawn:
TNT1 A 1 A_Look
Loop
See:
URSP A 3
URSP BCDEFGHIJK 3
Goto Chase
Chase:
URGE A 0 A_PlaySound ("urge/walk")
URGE AB 5 A_Chase
URGE C 0 A_PlaySound ("urge/walk")
URGE CD 5 A_Chase
Loop
Melee:
UAT2 A 3 A_FaceTarget
UAT2 B 3 A_SkullAttack
UAT2 C 3 A_SkelWhoosh
UAT2 DE 3 A_FaceTarget
UAT2 F 3 A_CustomMeleeAttack(random(1, 10) * 6, "urge/hit")
Goto Chase
Missile:
UAT1 ABC 2 A_FaceTarget
TNT1 A 0 A_ThrowGrenade("UrgeTNT", 15, 15, 5)
TNT1 A 0 A_StopSound
TNT1 A 0 A_PlaySound("skeleton/swing")
UAT1 DEF 2
UAT1 ABC 2 A_FaceTarget
TNT1 A 0 A_ThrowGrenade("UrgeTNT", 15, 15, 5)
TNT1 A 0 A_StopSound
TNT1 A 0 A_PlaySound("skeleton/swing")
UAT1 DEF 2
UAT1 ABC 2 A_FaceTarget
TNT1 A 0 A_ThrowGrenade("UrgeTNT", 15, 15, 5)
TNT1 A 0 A_StopSound
TNT1 A 0 A_PlaySound("skeleton/swing")
UAT1 DEF 2
Goto Chase
Pain:
URGP A 15 A_Pain
Goto Chase
Death:
UDED A 4 A_ScreamAndUnblock
UDED BCDEFGHIJKLMN 3
UDED O -1
Idle:
URSP K 3 A_PlaySound ("urge/see")
URSP JIHGFEDCBA 3
Goto Spawn
Raise:
UDED NMLKJIHGFEDCB 3
UDED A 4
Goto Chase
}
}
Share this post
Link to post
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.