scp_chaos1 Posted August 26, 2021 Posted August 26, 2021 Hi, I ask for help, again, this time it is about creating a mission_failed script, but for it to be used, 3 npcs will be used first, which will have a target towards a target_counter of 3, and this as a response will run the mission_failed script. Similar to the elder mission in JKA in t2_rancor, but I have a theory that I can bypass the other part using target_counter. Does anyone know if there is a mission_failed specific script not counting Kyle's or Ross's? In case it doesn't exist, can you guide me to create one with those characteristics? I am new to scripts, so I am unfamiliar with both the concepts and how to make it as optimal as possible. I am waiting for your responses and thanks in advance.
scp_chaos1 Posted August 27, 2021 Author Posted August 27, 2021 I think I don't explain it well, I will put it in the next file: What I need to create is the script that says your allies have died, examples of this script exist as Kyle_died and Rosh_died, I just want to create a new one so as not to rewrite an already made one. I just don't know how to do it in the most optimal way. That is why I ask for help. In other words, the only thing I want to do is create the script, nothing more. Asgarath83 likes this
Solution Asgarath83 Posted August 29, 2021 Solution Posted August 29, 2021 Hello. There are two different methods for do that. Method1:TargetCounter. the more easy. 1 - The NPCs that you need to protect should have as NPC_target the targetname value of the targetcounter. we will call it "failcounter" so NPC_target failcounter 2 -make a target_counter. it's targetname is failcounter. set count 3 target failrunner 3 - create a targetscriptrunner targetname: failrunner Usescript: mapname/failmission 4 - On Behaved use that: SET_MISSIONFAILED as value: TOOMANYALLIEDHASDIED build the map and the script. got it! On 8/27/2021 at 3:09 AM, scp_chaos1 said: I think I don't explain it well, I will put it in the next file: What I need to create is the script that says your allies have died, examples of this script exist as Kyle_died and Rosh_died, I just want to create a new one so as not to rewrite an already made one. I just don't know how to do it in the most optimal way. That is why I ask for help. In other words, the only thing I want to do is create the script, nothing more. Yes, that's the better way Method2: behaved variables another way is more complicated and require to declair a variable into icarus declair "failedmission" set failedmission, 0 when your NPC died, have as NPC_target failrunner and they run directly the failrunner script instead of a target_counter in that case the failrunner works like the t1_danger script that add ++1 on the failedmission variable value each time the script is runned. when you get 3 as value of your variable you run the SET_MISSIONFAILED TOOMANYALLIEDDIED . you can do that with an "if" field, exactly like t1_danger scp_chaos1 likes this
scp_chaos1 Posted August 29, 2021 Author Posted August 29, 2021 Thanks, I'll try both methods tonight. Asgarath83 likes this
scp_chaos1 Posted August 30, 2021 Author Posted August 30, 2021 The first method has worked, the second I will do when I have more experience in this. Thank you very much for the help. Asgarath83 likes this
Asgarath83 Posted August 30, 2021 Posted August 30, 2021 My Pleasure ^_^ Happy modding :) scp_chaos1 likes this
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