curve Posted June 16, 2014 Posted June 16, 2014 Hey guys its me again. I want to add a route and action (like use some trigger etc) to some npcs appearing in my multiplayer map. How do I do that? I've found an old tutorial here on jkhub, but thats not longer available.. Can please some1 tell me how to do that? I know there are some entities and waypoints I've to connect with the npcs, but I need to do some scripting. Thanks for help!curve
Dusty Posted June 16, 2014 Posted June 16, 2014 Yeah in SP anyway NPCs need waypoints, combat points, and nav goals if you want them to know how to move around a map.
curve Posted June 16, 2014 Author Posted June 16, 2014 Aaa.. Yeaaar.. I know.. But I want to give them a route and want to let them do some action like open doors or activate an elevator etc in my MP MAP not sp.. I've found that: http://www.sevristh.co.uk/tutorials_waypoints_1.html Does it work with a mp map too?
curve Posted June 24, 2014 Author Posted June 24, 2014 Hmm, please can someone help me here please? I've no idea if (and how) I can realize some npc routes in my mp map.... thanks...
Apprentice Posted June 25, 2014 Posted June 25, 2014 Not possible in multiplayer. The only game that is capable of running NPC characters inside the MP section, is Elite Force 2 but that is because the SP and MP part share the same executable . . .
curve Posted June 29, 2014 Author Posted June 29, 2014 Thank you Apprentice, that is what I wanted to know.
Boothand Posted June 30, 2014 Posted June 30, 2014 Not possible in multiplayer. The only game that is capable of running NPC characters inside the MP section, is Elite Force 2 but that is because the SP and MP part share the same executable . . . Hmm? JA multiplayer has working NPCs. Or am I misunderstanding what you mean?
Apprentice Posted July 2, 2014 Posted July 2, 2014 Hmm? JA multiplayer has working NPCs.If it is possible however I never saw it in any MP maps I've played . . . Or am I misunderstanding what you mean?Jedi Academy comes with both jasp.exe and jamp.exe, one for the single player portion and the other for the multiplayer portion. Altough they share a lot of content (e.g: /base map), a lot of specific code are stored in their respective executables, which cannot be attained by the other executable. This happened a lot in Raven games that utilizes the idTech3 engine and in the example of Elite Force 2 (which was developed by Ritual), only one executable is used by both the singleplayer and multiplayer portions and that is why elements from one portion can be used in the other, such as NPC scripting.
Boothand Posted July 2, 2014 Posted July 2, 2014 I haven't tried scripting NPC behavior in MP quite yet, although I'd be surprised if that didn't work, since you can spawn NPCs both from the console and in a map's worldspawn.
Solution Szico VII Posted July 6, 2014 Solution Posted July 6, 2014 @@curveIn Atlantica, I managed to do some basic NPC scripting behaviour, in the non-RPG version. Have a look at the source files for some info.https://jkhub.org/files/file/1561-atlantica-fix/ Specfically, theres NPCs walking around, sitting on benches e.t.c - This was done in the background_functions script file. Example: rem ( "Move NPC Jedi 1" ); affect ( "jedi1", /*@AFFECT_TYPE*/ FLUSH ) { flush ( ); set ( /*@SET_TYPES*/ "SET_WEAPON", /*@[member='weaponx']_NAMES*/ "WP_NONE" ); set ( /*@SET_TYPES*/ "SET_WALKSPEED", 200 ); wait ( 4000.000 ); loop ( -1 ) { rem ( "Jedi sits down" ); set ( /*@SET_TYPES*/ "SET_NAVGOAL", "nav1_sitdown" ); set ( /*@SET_TYPES*/ "SET_ANIM_BOTH", /*@ANIM_NAMES*/ "BOTH_SIT4" ); wait ( 1800.000 ); set ( /*@SET_TYPES*/ "SET_ANIM_BOTH", /*@ANIM_NAMES*/ "BOTH_SIT4" ); wait ( 1800.000 ); set ( /*@SET_TYPES*/ "SET_ANIM_BOTH", /*@ANIM_NAMES*/ "BOTH_SIT4" ); wait ( 1800.000 ); set ( /*@SET_TYPES*/ "SET_ANIM_BOTH", /*@ANIM_NAMES*/ "BOTH_SIT4" ); wait ( 1800.000 ); set ( /*@SET_TYPES*/ "SET_ANIM_BOTH", /*@ANIM_NAMES*/ "BOTH_SIT4" ); wait ( 1800.000 ); set ( /*@SET_TYPES*/ "SET_ANIM_BOTH", /*@ANIM_NAMES*/ "BOTH_SIT4" ); wait ( 1800.000 ); set ( /*@SET_TYPES*/ "SET_ANIM_BOTH", /*@ANIM_NAMES*/ "BOTH_SIT4" ); wait ( 1800.000 ); set ( /*@SET_TYPES*/ "SET_ANIM_BOTH", /*@ANIM_NAMES*/ "BOTH_SIT4" ); wait ( 1800.000 ); set ( /*@SET_TYPES*/ "SET_ANIM_BOTH", /*@ANIM_NAMES*/ "BOTH_SIT4" ); wait ( 1800.000 ); set ( /*@SET_TYPES*/ "SET_ANIM_BOTH", /*@ANIM_NAMES*/ "BOTH_SIT4" ); wait ( 1800.000 ); rem ( "Jedi gets up and walks to waypoint 2" ); set ( /*@SET_TYPES*/ "SET_NAVGOAL", "nav2_garden" ); set ( /*@SET_TYPES*/ "SET_ANIM_BOTH", /*@ANIM_NAMES*/ "BOTH_STAND1" ); wait ( 8000.000 ); rem ( "Jedi walks to waypoint 3" ); set ( /*@SET_TYPES*/ "SET_NAVGOAL", "nav3_garden" ); wait ( 8000.000 ); rem ( "Jedi walks to bench" ); set ( /*@SET_TYPES*/ "SET_NAVGOAL", "nav1_garden" ); wait ( 8000.000 ); }You might wonder why theres so many "set-anim" commands. Well thats because it doesnt work properly in MP, and wont repeat or hold an animation. Therefore you have to manually add in how many times you want the animation to run inside of any looped command where there are other actions. The navgoal stuff seems to work fine though.
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