Code of the actor I need to do that:
Code: Select all
actor FriendlyMarine
{
Health 120
Speed 14
Radius 16
Height 56
Species "Marine"
PainChance 100
Monster
+FLOORCLIP
-COUNTKILL
+FRIENDLY
+DONTHARMSPECIES
+THRUSPECIES
-ACTIVATEMCROSS
+QUICKTORETALIATE
+AVOIDMELEE
//+DROPOFF
+FLOORCLIP
SeeSound "marine/HUUHUUUH"
ActiveSound "marine/HUUHUUUH"
DeathSound "*death"
PainSound "*pain50"
Translation 1
var int user_shots;
states
{
Spawn:
PLAY AB 10 A_Look
/*Idle:
PLAY ABAB 10 A_Look
PLAY ABCDABCD 4 A_Wander
Loop*/
Loop
See:
PLAY AABBCCDD 2 A_Chase
Loop
Missile:
PLAY F 2 BRIGHT
{
A_FaceTarget;
A_AlertMonsters;
A_PlaySound ("grunt/attack");
A_CustomBulletAttack (2.5, 0, 1, random(1,5) * 3, "BulletPuff", 0, CBAF_NORANDOM);
//A_Chase("","",CHF_NODIRECTIONTURN);
user_shots++;
}
TNT1 A 0 A_Chase("","",CHF_NODIRECTIONTURN)
PLAY E 2 A_CposRefire
TNT1 A 0 A_Chase("","",CHF_NODIRECTIONTURN)
PLAY E 0 A_JumpIf(user_shots > 14, "Reposition")
Goto Missile
Reposition:
PLAY A 0 A_SetUserVar(user_shots, 0)
PLAY AABBCCDD 2
{
A_Chase("", "",CHF_NODIRECTIONTURN);
A_FaceTarget;
}
TNT1 A 0 A_ClearTarget
Goto Missile
Pain:
PLAY G 3 A_Pain
Goto See
Death:
PLAY H 10
PLAY I 10 A_Scream
PLAY J 10 A_NoBlocking
PLAY KLM 10
PLAY N -1
Stop
XDeath:
PLAY O 5
PLAY P 5 A_XScream
PLAY Q 5 A_NoBlocking
PLAY RSTUV 5
PLAY W -1
Stop
}
}