IrocJeff Posted November 13, 2013 Share Posted November 13, 2013 I've followed a tutorial and managed to get my NPC to wander. When you fire at him he runs to the nearest combat point and returns fire along the way. But, when you don't fire at him, you have to be right up next to it or it will ignore you. Is there anything in Behaved I can add to the script to make the NPC see me earlier? Here is the script. //Generated by BehavEd set ( /*@SET_TYPES*/ "SET_BEHAVIOR_STATE", /*@BSTATE_STRINGS*/ "BS_WANDER" );set ( /*@SET_TYPES*/ "SET_RUNNING", /*@BOOL_TYPES*/ "false" );set ( /*@SET_TYPES*/ "SET_WALKING", /*@BOOL_TYPES*/ "true" );set ( /*@SET_TYPES*/ "SET_ANGERSCRIPT", "icestationwampa/alert1" ); here is my alert script flush ( );set ( /*@SET_TYPES*/ "SET_BEHAVIOR_STATE", /*@BSTATE_STRINGS*/ "BS_DEFAULT" );set ( /*@SET_TYPES*/ "SET_RUNNING", /*@BOOL_TYPES*/ "true" );set ( /*@SET_TYPES*/ "SET_WALKING", /*@BOOL_TYPES*/ "false" ); Link to comment
therfiles Posted November 14, 2013 Share Posted November 14, 2013 set ( /*@SET_TYPES*/ "SET_ANGERSCRIPT", "icestationwampa/alert1" ); What does this script look like? Link to comment
eezstreet Posted November 14, 2013 Share Posted November 14, 2013 Maybe your problem lies in the .npc file. Try setting hfov/vfov to higher values (if they're set at all). Same for "earshot". Link to comment
Circa Posted November 14, 2013 Share Posted November 14, 2013 He's working with Jedi Outcast I believe, if that makes a difference. Link to comment
IrocJeff Posted November 14, 2013 Author Share Posted November 14, 2013 What does this script look like?flush ( );set ( /*@SET_TYPES*/ "SET_BEHAVIOR_STATE", /*@BSTATE_STRINGS*/ "BS_DEFAULT" );set ( /*@SET_TYPES*/ "SET_RUNNING", /*@BOOL_TYPES*/ "true" );set ( /*@SET_TYPES*/ "SET_WALKING", /*@BOOL_TYPES*/ "false" ); Link to comment
IrocJeff Posted November 14, 2013 Author Share Posted November 14, 2013 Maybe your problem lies in the .npc file. Try setting hfov/vfov to higher values (if they're set at all). Same for "earshot". I think I can set this stuff in BehavED from what I glanced over in the manual. Now, where would I add those script lines to? Would I put it in my Wander script or would I put it in the Alert Script? Link to comment
eezstreet Posted November 14, 2013 Share Posted November 14, 2013 Spawn script, probably, if you have one. Link to comment
Asgarath83 Posted November 14, 2013 Share Posted November 14, 2013 If yu want that NPC purchase the player set SET_CHASE_ENEMIES True. also, in npc file set a higher value of aggression. 5 is the max.also add SET_ENEMY "player" NumberWan likes this Link to comment
IrocJeff Posted November 14, 2013 Author Share Posted November 14, 2013 I think it has to do with the SET_BEHAVIOR to WANDER. I tried what was mentioned but it didn't work. I also switched the BEHAVIOR to SEARCH. My npc will walk from the spawnpoint to the first waypoint but then stops. Now, If he sees me before he gets there, then he'll run to the combat points. But, once he gets to the waypoint, thats it. He just sits there. I think I have to use nav goals instead of WANDER for the NPC's to fire at me on their own. Link to comment
Asgarath83 Posted November 14, 2013 Share Posted November 14, 2013 for a correct fight, the BEHAVOUR must be on DEFAULT, or, the NPC will fight in a squad with a commander, in BS_FOLLOW_LEADER and yu need to set the leader in another set line command.if yu have problem to force NPC to exit by wander state, try in the anger script SET_BEHAVOUR_STATE BS_WANDER : False.SET_BEHAVOUR_STABE BS_DEFAULT, True.but it's strange, for me, was every make sufficient to switch by a state to another for solve that's problem. I have a NPC that go in BS_WANDER state in a battle for feed his energy and restore health, and after return of plater and another char there is a movie, at the end of the movie, the wound NPC get full health and switch to combat without problems, he run to a door, open with a magical spell and go inside the door and disappering. the door open in the other side of the hallway and ,...player and his friend attack enemies by behind, the ex wandering NPC appear by door and strike enemy surprising at the back.Yes, i that in my mod. O.o Link to comment
therfiles Posted November 15, 2013 Share Posted November 15, 2013 You reference an anger script AND an alert script. Try adding both to your spawn script. NumberWan likes this Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now