Cunnah Posted May 1, 2002 Author Share Posted May 1, 2002 that is rather wierd ill give you that.........hmm, a lot of the AI is scripted if you go back to the game and play a few levels you'll notice that not a lot of the baddies actualy run around, kejim is a good example Link to comment Share on other sites More sharing options...
FEXX Posted May 1, 2002 Share Posted May 1, 2002 Yeah, more or less that is true. But I recall that when I entered a large room, and moved a little forward, I likely hit a NODRAW tigger, and then they'd come running at me from afar. I need to learn how a tigger can make the NPC wake up and attack the player still. Link to comment Share on other sites More sharing options...
patchx Posted May 2, 2002 Share Posted May 2, 2002 i noclipped and notragetted thru the kejim level and there are some enemies that r spawned from the very start (who u dont have to trigger to spawn) who were patrolling back and forth without ever seeing kyle i really need some dudes to come marching up in my level from a fairly long distance is there some thing u have to set to get them into patrol mode or something do u think? -patch Link to comment Share on other sites More sharing options...
Caster Troy Posted May 4, 2002 Share Posted May 4, 2002 That's exactly what i want! I was going to do it with waypoints, but I can't get anyone to move. About the stormtroopers standing until the reborn are dead... This seems to be coded into the AI. It makes it more dramatic I think (a sword battle going on in the middle with guys standing around watching). I noticed this on the detention cell level of the doomgiver. In that levle, you go into a big room with a imperial shuttle, two reborn and a bunch of storm troopers. If you start fighting the reborn, the storm troopers will generally stop shooting at you until you attack them or kill the reborn. About waypoints... how do you tell the NPC's which waypoints to follow? Cunnah, in your tutorial, you only said to put waypoints and link them, you said nothing about them in relation to the NPCs..... Link to comment Share on other sites More sharing options...
FunClown Posted May 4, 2002 Share Posted May 4, 2002 My stormtroopers have been using the wayponts without them targetting them or waypoints targetting them. I'm still getting the gist of it but when I name a stormtrooper with targetname and a value the stormtrooper disappears in the game. Very strange. Link to comment Share on other sites More sharing options...
patchx Posted May 4, 2002 Share Posted May 4, 2002 thats because their waiting to be told to spawn if u give a npc a targetname it thinks it cant spawn until whatevers targetting it sends a message to activate it this is so u can target npcs with trigger brushes so that they arent in the game until the player reaches a certain spot -patch Link to comment Share on other sites More sharing options...
FunClown Posted May 4, 2002 Share Posted May 4, 2002 hmmm thanks patch, should try that out. Link to comment Share on other sites More sharing options...
Cunnah Posted May 4, 2002 Author Share Posted May 4, 2002 ok look you don't have to actualy link any NPCs to the waypoint paths for them to use them. NPCs use them as resource, its like sign posts in a city everyone uses then, there aren't any signs just for sepcific ppl. Same with waypoints, NPCs can use them but they don't have to so realy they aren't directly linked them but they help any NPC navigate. If your stormies aren't using them remeber they can only move to a combat point that can see you, there like securaty cameras. Also if they don't move it could be the don't have to, try changing your storm troopers to commander stormies they have a flechet and will try to get close to you. NOTE: For a combat point to see the player the player has to be NEAR it as well, dunno how close though Link to comment Share on other sites More sharing options...
Oz Posted May 4, 2002 Share Posted May 4, 2002 patchx is right about NPC's waiting to spawn to if you give them a targetname, because the entity is actually a spawner which spawns NPC's, and not an NPC itself. If you want the NPC that gets spawned to have a targetname, you should use NPC_targetname. Link to comment Share on other sites More sharing options...
patchx Posted May 5, 2002 Share Posted May 5, 2002 hey Cunnah just wondering if u knew anything about the behavourial "strings" listed in the npc**** entity it says it sets npc behaviour without using scripts and stuff but i was wondering if this was leftover from EF and didnt work anymore or what cause i cant see any difference when i use them heres a few of the ones it says are possible default - 0: whatever idle - 1: Stand around, do abolutely nothing roam - 2: Roam around, collect stuff walk - 3: Crouch-Walk toward their goals run - 4: Run toward their goals -patch Link to comment Share on other sites More sharing options...
Cunnah Posted May 5, 2002 Author Share Posted May 5, 2002 no they don't work im going through kejim and once i got my bsp to map convert working every other lvl to make a list of the comands and what they do, then ill see if there transferable or not Link to comment Share on other sites More sharing options...
patchx Posted May 5, 2002 Share Posted May 5, 2002 excellent! i hope ur gonna post ur findings -patch Link to comment Share on other sites More sharing options...
Cunnah Posted May 5, 2002 Author Share Posted May 5, 2002 NO I WANT POWER OVER YOU MERE MORTALS YOU WILL NEVER UNLOCK THE SECRET OF MY POWER just kidding expect a post after i've posted my up and coming Duel map Link to comment Share on other sites More sharing options...
Pseudopath Posted May 16, 2002 Share Posted May 16, 2002 Cunnah - Do the waypoints need to be sequential in their targets? I am trying to cut corners... - Pseudopath. Link to comment Share on other sites More sharing options...
DarkLord79at Posted May 16, 2002 Share Posted May 16, 2002 Hi folks! If you really want to force a NPC to move to a specific point, you'll need 1. waypoint_navgoal entities 2. an ICARUS script 3. in order to compile 2., get yourself the Elite Force GDK Use a script like this: <begin> //Generated by BehavEd rem ( "4 point loop patrol script" ); rem ( "Reference: set ( 'SET_NAVGOAL', $get( STRING, 'SET_PARM1' )$ );" ); rem ( "Don't forget to use waypoint_navgoal's for this!" ); rem ( "You also need to add parm's to your entity." ); rem ( "Note that your entity might disappear if a targetname is set." ); task ( "patrol1" ) { set ( /*@SET_TYPES*/ "SET_NAVGOAL", $get( STRING, "SET_PARM1")$ ); } task ( "patrol2" ) { set ( /*@SET_TYPES*/ "SET_NAVGOAL", $get( STRING, "SET_PARM2")$ ); } task ( "patrol3" ) { set ( /*@SET_TYPES*/ "SET_NAVGOAL", $get( STRING, "SET_PARM3")$ ); } task ( "patrol4" ) { set ( /*@SET_TYPES*/ "SET_NAVGOAL", $get( STRING, "SET_PARM4")$ ); } loop ( -1 ) { dowait ( "patrol1" ); dowait ( "patrol2" ); dowait ( "patrol3" ); dowait ( "patrol4" ); } <end> (without <begin> and <end> of course) Note 1: The above script has to be put in a .txt-file and compiled with BehavEd (Elite Force GDK). Produces an .ibi in the source file folder. Note 2: Set targetname variables in your waypoint_navgoal entities. They correspond to the parm entries of your NPC. With variable I mean something equivalent to classname entries for example; use the two text fields at the bottom of the entity browser. Note 3: Define parm variables in your NPC (parm1 .. parm4) - the value of them corresponds to the targetname of a waypoint_navgoal. Note 4: Define a spawnscript variable for your NPC containing the path and name of the script: create a folder <yourlevelname> under the scripts folder. Put your compiled script (.ibi) there. In case the script is called patrol_loop.ibi and your level first_level, you would enter first_level/patrol_loop as spawnscript. Conclusion: We use a relative path to the scripts folder, no file extension and slashes instead of backslashes. Note 5: Following the ICARUS manual, tasks should be defined outside of loops. dowait's mean an execution of a command and waiting with the script execution until the command has finished. This way of scripting navgoals might be a bit more complicated but it's an example of good and reusable scripting. You can use the script for any NPC with a 4 waypoint patrol. You can also derive other scripts from this example, like an only two waypoint patrol script. Take a look at the ICARUS beta manual, although most things doesn't seem to apply to JO or are inconsistent. Using DEvaheb (do a web search) you will be able to get an idea of how Raven accomplished some things (although many things seem to be hardcoded in the exe). Ah, btw, DEvaheb is a decompiler for .ibi-files ... Best regards and good luck Link to comment Share on other sites More sharing options...
Ryouga Posted May 16, 2002 Share Posted May 16, 2002 Okay so I know this is off topic and gonna sound REALLY newbish (I'am a newbie to entities in maps ) How do you spawn SP NPCs, I cant find em and this is the only topic close to them Link to comment Share on other sites More sharing options...
Pseudopath Posted May 17, 2002 Share Posted May 17, 2002 You "might" find this useful........ http://www.eliteforce-online.4players.de:1044/download/behaved.zip - Pseudopath. Link to comment Share on other sites More sharing options...
RichDiesal Posted May 17, 2002 Share Posted May 17, 2002 Use a script like this: <begin> //Generated by BehavEd rem ( "4 point loop patrol script" ); rem ( "Reference: set ( 'SET_NAVGOAL', $get( STRING, 'SET_PARM1' )$ );" ); rem ( "Don't forget to use waypoint_navgoal's for this!" ); rem ( "You also need to add parm's to your entity." ); rem ( "Note that your entity might disappear if a targetname is set." ); blah blah blah I'm not exactly a master of scripting, so could you explain this in simpler terms? I tried to compile the .ibi based off of this (I'm trying to create a 4 point loop patrol), and it gave me an error (return code 1). Am I supposed to modify it somehow first? Thanks. Link to comment Share on other sites More sharing options...
patchx Posted May 17, 2002 Share Posted May 17, 2002 that patrol thing didnt work for me would it need waypoints around the navgoals or the npc or something? -patch Link to comment Share on other sites More sharing options...
Cunnah Posted May 24, 2002 Author Share Posted May 24, 2002 BUMB Link to comment Share on other sites More sharing options...
CheeseY Posted May 29, 2002 Share Posted May 29, 2002 ^BUMP-O-RAMA^ If anyone can help us out with our patrolling stormtroopers and knows an easier way?? other than cryptic scriptin ;-) Thanks in advance *cough* raven guys CheeseY p.s: maybe someone could include some simple-simple pre-done scripts that work ta Link to comment Share on other sites More sharing options...
Pseudopath Posted May 30, 2002 Share Posted May 30, 2002 Try this link! http://www.lucasforums.com/showthread.php?s=&threadid=57585 I have managed to get a straight line script to work but I am sure you guys can better me with a 2D version ;¬) If you want my script post a reply on :- http://www.lucasforums.com/showthread.php?s=&threadid=57012 And I will send you the txt file. (btw I am using EF BehavED to compile, so I dont have access to the SDK! ) Thankz. - Pseudopath. Link to comment Share on other sites More sharing options...
DarkLord79at Posted June 9, 2002 Share Posted June 9, 2002 Originally posted by RichDiesal I'm not exactly a master of scripting, so could you explain this in simpler terms? I tried to compile the .ibi based off of this (I'm trying to create a 4 point loop patrol), and it gave me an error (return code 1). Am I supposed to modify it somehow first? Thanks. Hello Rich and the others! Sorry for answering a bit late, but without searching and e-mail notification not working properly it's a bit messy. I'm also sorry that you have problems to follow my tutorial - let me offer you the source first (just to avoid any copy and paste errors): http://members.aon.at/markysplace/jo/mme_4_point_patrol_loop.txt I just compiled this script with BehavEd as a verification and there was no error (I'm using the Raven version from the SDK now, but it also compiled with the EF one when I wrote the first post). Compiled: http://members.aon.at/markysplace/jo/mme_4_point_patrol_loop.ibi To my remarks ( rem("blah"); ): To clear things up with waypoint_navgoal's and parm-entries, take a look at this screenshot (beware - over 200 K): http://members.aon.at/markysplace/jo/radiant_patrol.jpg As you can see, you create new key/value pairs for the NPC (a stormtrooper in this case) where the keynames are in a format parmx, x being a number from 1 to ?. This parameter can be referenced from the script: set ( /*@SET_TYPES*/ "SET_NAVGOAL", $get( STRING, "SET_PARM1")$ ); This means nothing more than that a navigation goal is set (waypoint_navgoal), which has a targetname of <value of parm1> -> in this case w1. Looks complicated in code but is not so difficult to be created under the BehavEd GUI. So how does the script know where to get the parm-entries from? Simple, the script is assigned as a spawnscript to the stormtrooper (a script being executed when the NPC is created upon level start), so you can regard the stormie as some kind of "parent" for the script - as a result, the script applies the commands to the stormie per default. Take a look at the ladder scripts and ICARUS manual, you would use affect("name"); if you wanted to control any other game object. To simplify it, we could have written: set ( /*@SET_TYPES*/ "SET_NAVGOAL", "w1" ); In that case you wouldn't even need parm-entries. But the power in the way the script was done lies in the fact that it can be used again and again throughout your map. Just create waypoint_navgoal's with different targetnames and feed them as parameters to the appropriate NPCs. I might also add that text after // is a comment as well as text within /* */ - as you can see, BehavEd uses its own comments to keep track of special enumeration types. The line could also have been written: set ( "SET_NAVGOAL", "w1" ); rem("some text"); in a script is also a remark, a comment - but note the difference: //, /* */ => not shown under BehavEd GUI rem() => shown and editable under BehavEd GUI! The syntax rules in ICARUS might seem quite familiar to C/C++/Java/Perl programmers - functions with parentheses, code blocks { }, always a terminating semicolon ; and the style of the comments. Now let's continue with my other remarks in the code! Ignore the thing about "Reference: " - it was just a remark for myself. Regarding targetnames: I didn't know it before but it was explained in this thread. Giving a targetname to a NPC entity makes it invisible in the game waiting for some script to spawn it (eg. a Reborn appearing when you reach a certain spot, press a switch et al). Hope this cleared up some things guys! I understand that some of you haven't ever scripted in any way - regrettably I'm the wrong one to teach you those basics. There are good tutorials and books on programming in general, VBScript and other scripting languages. You'll definitely need some basic programming knowledge like: What are variables? What are functions/methods? What are loops? VBScript might be a good start for beginners since it is relatively easy to learn and free available for Windows OS'. Should further questions arise, please ask. I'll try to answer. But please understand: I'm no JO scripting guru - I don't have that much time for JO editing either. I only have my two room playing ground so far May the Force be with you DarkLord Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.