Hi guys! That's my first thread, and I need help with 2 questions:
1) So, I'm trying to implement
Scimitar's Stealth System into my project, but I know virtually nothing about scripts, so I'm having a hard time trying to make the AI compatible with the stealth thingy...
What I tried to do to the AI was to change this:
;RANDOMIZE THE IDLE POSE FOR VARIATION
:state=499,random=3:state=500
:state=499,random=2:state=501
:state=499,random=1:state=502
:state=500:animate=94
:state=500,healthless=100:sethealth=100,state=5 ;if shot, reset health. remember a headshot will immediately register a kill in a later state below!
:state=500,plrdistwithin=400,plrcanbeseen:state=5,rotatetoplr
:state=501:animate=95
:state=501,healthless=100:sethealth=100,state=5 ;if shot, reset health. remember a headshot will immediately register a kill in a later state below!
:state=501,plrdistwithin=400,plrcanbeseen:state=5,rotatetoplr
:state=502:animate=96
:state=502,healthless=100:sethealth=100,state=5 ;if shot, reset health. remember a headshot will immediately register a kill in a later state below!
:state=502,plrdistwithin=400,plrcanbeseen:state=5,rotatetoplr
into this:
;RANDOMIZE THE IDLE POSE FOR VARIATION
:state=499,random=3:state=500
:state=499,random=2:state=501
:state=499,random=1:state=502
:state=500:animate=94
:state=500,healthless=100:sethealth=100,state=5 ;if shot, reset health. remember a headshot will immediately register a kill in a later state below!
:state=500,[b]plrcanbeseen,plrdistwithin=%stealth[/b]:state=5,rotatetoplr
:state=501:animate=95
:state=501,healthless=100:sethealth=100,state=5 ;if shot, reset health. remember a headshot will immediately register a kill in a later state below!
:state=501,plrdistwithin=400,plrcanbeseen:state=5,rotatetoplr
:state=502:animate=96
:state=502,healthless=100:sethealth=100,state=5 ;if shot, reset health. remember a headshot will immediately register a kill in a later state below!
:state=502,plrdistwithin=400,plrcanbeseen:state=5,rotatetoplr
But them I realize that the stealth system would only work for AI when the enemie were in state=500 (assigned at random).
So, how can I set the enemie so it is able to see me by proximity
and by how stealthy I am, in all those states (500, 501, 502)?
2) In Scimitar's topic he also said that - in order to make the enemy respond to the noise the player make - one should put something along these lines into the AI:
:state=1,aiheardsound=%sound:state=2,etimerstart.aisettarget
:state=2:airotatetosound,aimovetosound,rotateheadrandom=30
:state=2,etimergreater=2000:aistop,state=3,etimerstart
:state=3:state=1
So, my last question is, how can that be added into the AI code from the first question? I mean, what should I do to make the enemy able to see the player: a)by proximity, b)by the stealth thingy and, c)by the noise I make?
"Wherever you go, there you are."