I'm having a serious problem trying to get this to work. I'm trying to create an AI script using ZSCRIPT for an NPC that wanders around randomly but occasionally STOPS moving and mumbles to himself before continuing wandering around aimlessly. For some reason, I cannot make this work. Usually, the character just stays completely still until they mumble to themselves and move only when they do. (basically the complete opposite of what I'm trying to do. Can anyone help? My code is as follows:
Question
Cacodoomonic
I'm having a serious problem trying to get this to work. I'm trying to create an AI script using ZSCRIPT for an NPC that wanders around randomly but occasionally STOPS moving and mumbles to himself before continuing wandering around aimlessly. For some reason, I cannot make this work. Usually, the character just stays completely still until they mumble to themselves and move only when they do. (basically the complete opposite of what I'm trying to do. Can anyone help? My code is as follows:
//wandering variant for natural habitats class MiseryGuts : Actor { Default { Speed 10; Radius 30; Height 56; Mass 400; Renderstyle "Normal"; Bloodcolor "none"; SeeSound "npc/mumble"; ActiveSound "npc/mumble"; } States { Spawn: CHAT ABC 8 {A_Wander(); A_StartSound ("npc/mumble");} MUMB AAAAAAAAAAAAA 8; MUMB AAAA 0 A_LookEx (LOF_NOSOUNDCHECK, 32, 0, 0, 30, "See"); MUMB AAAAAAAAAAAAA 8; CHAT ABC 8 {A_Wander(); A_StartSound ("npc/mumble");} MUMB AAAAAAAAAAAAA 8; CHAT ABC 0 A_LookEx (LOF_NOSOUNDCHECK, 32, 0, 0, 30, "See"); loop; See: CHAT A 8 {A_LookEx(); A_StartSound ("npc/mumble");} CHAT B 8 A_Look; CHAT C 8 A_Look; MUMB BCDEBCDEBCDEBCDEBCDEBCDE 8 A_Wander; MUMB A 0 A_LookEx (LOF_NOSOUNDCHECK, 32, 0, 0, 30, "See"); MUMB BCDEBCDEBCDEBCDEBCDEBCDE 8 A_Wander; CHAT A 8 {A_LookEx(); A_StartSound ("npc/mumble");} CHAT B 8 A_Look; CHAT C 8 A_Look; MUMB BCDEBCDEBCDEBCDEBCDEBCDE 8 A_Wander; MUMB A 0 A_LookEx (LOF_NOSOUNDCHECK, 32, 0, 0, 30, "See"); Loop; } }
The game also closes down randomly (as if this script is causing a crash). Help please?
Edited by CacodoomonicShare this post
Link to post
7 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.