Jump to content

I need help creating a script.


Go to solution Solved by Asgarath83,

Recommended Posts

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.

Link to comment

I think I don't explain it well, I will put it in the next file:

script 001

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
Link to comment
  • Solution

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:

script 001

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
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...