So, i would like launch random sound, when i near the civilian and when i use "action" key (spacebar for me), to hear "hello", or "what do you want", etc, etc... I tried to add "A_Playsound( "hom/act") but it doesn't work, or "Use:", but nothing.
Anyone can help me to know the correct synthaxe to do that, please?
Thanks for your advices x)
Alain
Code: Select all
// -------------------------------------------------------
actor CivilianMale1 32326
{
//$Category DDD
//$Title "Civil 1"
Health 40
Radius 20
Height 40
Speed 8
Damage 100
PainChance 200
MONSTER
seesound "hom/see"
painsound "hom/pain"
deathsound "hom/deat"
activesound "hom/act"
meleesound "hom/act"
scale 0.7
States
{
Spawn:
CVM2 A 0 NoDelay A_SetSpecial(130,0)
CVM2 A 0 A_SpawnItemEx("CivMarker",0,0,0,0,0,0,0,SXF_SetMaster)
GoTo Think
Think:
CVM2 A 10 A_Look
Loop
See:
// A_Chase le perso nous suit
// A_Wander il se balade
CVM2 AABBAACC 2 A_Wander
CVM2 A 0 A_Chase
Loop
Melee:
CVM2 EE 5 A_FaceTarget
CVM2 E 30
Goto See
Pain:
CVM2 E 3
CVM2 E 3 A_Pain
Goto RunAway
RunAway:
TNT1 A 0 A_ChangeFlag("Frightened", True)
TNT1 A 0 A_SetSpeed(15,AAPTR_DEFAULT)
CVM2 AAAABBBBCCCCBBBB 1 A_Chase
CVM2 AAAABBBBCCCCBBBB 1 A_Chase
CVM2 AAAABBBBCCCCBBBB 1 A_Chase
CVM2 AAAABBBBCCCCBBBB 1 A_Chase
CVM2 AAAABBBBCCCCBBBB 1 A_Chase
TNT1 A 0 A_SetSpeed(3,AAPTR_DEFAULT)
TNT1 A 0 A_ChangeFlag("Frightened", False)
Goto See
Death:
CVM2 I 5
CVM2 J 5
CVM2 K 5
CVM2 L 5
CVM2 M -1
Stop
Idle:
CVM2 AA 4 A_Wander
CVM2 A 0 A_Look
CVM2 BB 4 A_Wander
CVM2 A 0 A_Look
CVM2 AA 4 A_Wander
CVM2 A 0 A_Look
CVM2 CC 4 A_Wander
CVM2 A 0 A_Look
Loop
Active:
CVM2 A 1
Goto Fade
Fade:
CVM2 A 1 A_FadeOut(0.1,FTF_REMOVE|FTF_CLAMP)
Loop
}