Jump to content

Home

killing friendlies


patchx

Recommended Posts

I see "SET_FFDEATHSCRIPT", described as "Script to run when player kills a teammate." Perhaps make a blank script, then set ffdeathscript as a key, with the value the path to the script (ex: common/whatever , for the script whatever.ibi located in the scripts/common folder). Just a guess..

Link to comment
Share on other sites

Just did a bit of research:

 

In kejim_post, the Jan entity has a NPC_target "jandeath", so it is targeted at a target_scriptrunner entity which, of course, has a targetname "jandeath". The scriptrunner entity has a key "usescript" with the value "kejim_post/jan_death".

 

Here's jan_death.ibi:

 

//Generated by BehavEd

 

rem ( "jan died, so mission failed!" );

wait ( 2000.000 );

set ( /*@SET_TYPES*/ "SET_MISSIONFAILED", /*@MISSIONFAILED*/ "MISSIONFAILED_JAN" );

 

 

Result: when Jan dies, a target is fired to the target_scriptrunner entity, which in turn runs the jan_death script. The script waits 2 seconds, then fails the mission.

 

I believe if you add a friendly entity to a level of your own, then the level will not automatically fail if you kill the friendly. Have you tried this, or were you simply wondering based on results from Raven's SP levels? I'm interested as well..

 

[Edit: Yoink, I type this long post and you've already figured it out and posted! How did you get it to work?]

Link to comment
Share on other sites

well i was making some Gran pirates that you break out of a new republic prison while looking for ur sister (u play as tavion) an i needed them to kill th same dudes as you but i thought itwas out of character for tavion to fail a mission if she just kills some dumb ass pirates so i changed the npc's.cfg file for them so that ther player team neutral (they dont shoot you but their not friendly) an enemyteam enemy (they killl the same dudes u do.

 

and then i set them up with a script so that they follow u still

 

-patch

Link to comment
Share on other sites

i changed the npc's.cfg file for them so that ther player team neutral (they dont shoot you but their not friendly) an enemyteam enemy (they killl the same dudes u do.

 

Ah, I figured as much. Nice job.

 

i packed my level and all its new stuff as a loadable mod that the player selects from the setup/mods menu in JK2

 

Is this just a .pk3 file, then?

Link to comment
Share on other sites

its a pk3 file inside a folder called "Tavion" which is the name of my level which goes in the gamedata (not the base) folder along with a gamestart.cfg file and theres a new ui/newgame.menu file in the pk3

 

i dont really know the ins and outs of it but AKPiggot explains it well in his definitive guide to sabers sticky at the top of the general editing forum

 

-patch

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...