rllyguy Posted January 17, 2013 Share Posted January 17, 2013 Hey guys, I was just wondering if there is a opcode that checks if the player.actor was discovered by a different actor? Since there is obviously a detection script in game. Link to comment Share on other sites More sharing options...
Ashwin.Star Posted January 17, 2013 Share Posted January 17, 2013 I don't think such a opcode is Available yet, Alter: check the distance after which they can discover the Player, & from next time, you can check if the current Dist. is less or Equal to discover-able Dist. Link to comment Share on other sites More sharing options...
Silent Posted January 17, 2013 Share Posted January 17, 2013 What do you mean by discover? I'm pretty sure you want HAS_CHAR_SPOTTED_CHAR though. Link to comment Share on other sites More sharing options...
rllyguy Posted January 18, 2013 Author Share Posted January 18, 2013 What do you mean by discover? I'm pretty sure you want HAS_CHAR_SPOTTED_CHAR though. Yes, that was exactly what I was looking for. Thanks for the help. Link to comment Share on other sites More sharing options...
rllyguy Posted January 18, 2013 Author Share Posted January 18, 2013 Although, I made a script that ask if the actor has spotted the player and will attack the player if it did. However, I didn't even wasn't even in front of the actor (crouched) and he attacked me straight away. Link to comment Share on other sites More sharing options...
[µT] Posted January 20, 2013 Share Posted January 20, 2013 Although, I made a script that ask if the actor has spotted the player and will attack the player if it did. However, I didn't even wasn't even in front of the actor (crouched) and he attacked me straight away. try using the set ped_acquaintance opcode. set the default behavior of the ped to you to "2" (this makes the ped ignore you until provoked) and then once he's spotted the player use the same ped_acquaintance opcode and set it to "4" (attack on site) Link to comment Share on other sites More sharing options...
rllyguy Posted January 23, 2013 Author Share Posted January 23, 2013 Well the thing is that, I wanted to make a script that if you get discovered for a long period of time, you will lose the game. So, I was wondering if there is any opcodes that can help me achieve that. Link to comment Share on other sites More sharing options...
Shmoopy Posted January 23, 2013 Share Posted January 23, 2013 Try to make a script using these : 00A0: store_actor $PLAYER_ACTOR position_to [email protected] [email protected] [email protected] 0855: get_actor $PLAYER_ACTOR noise_level_at [email protected] [email protected] [email protected] store_to [email protected] 0364: actor [email protected] spotted_actor $PLAYER_ACTOR 0172: [email protected] = actor $PLAYER_ACTOR Z_angle 0172: [email protected] = actor [email protected] Z_angle if and0019: [email protected] > 0 00F3: actor $PLAYER_ACTOR near_actor [email protected] radius 2.0 2.0 0.0 on_foot then else if or0364: actor [email protected] spotted_actor $PLAYER_ACTOR 0045: [email protected] == [email protected] // (float) then This is not 100% accurate , so you must check first all the possibilities that can make the script look weird . Link to comment Share on other sites More sharing options...
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