dvader28 Posted May 18, 2002 Share Posted May 18, 2002 Hi all! How do i make NPC's walk around, for example, stormtroopers patrol etc? I assume it's something to do with waypoints and scripts, but it's not the kind of thing u can just work out! Cheers in advance! Link to comment Share on other sites More sharing options...
Xcom Posted May 18, 2002 Share Posted May 18, 2002 You assume correctly, however until we have scripting tools there is no much control in this. There are several 'common', existing scripts which you can use for this. Example: 1st step: - create 2 waypoint_navgoal entities. Put them at some distance from each other. - select first one, press N and enter following values in the text fields: key: targetname value: ng1 - Press Enter and close the entity window. - Repeat this for the second navgoal, only give it ng2 targetname. 2nd step: -create NPC_Strormtrooper, place him somewhere from where he can see the navgoals. - select him and press N. Enter following (press Enter each time you have entered key & value): key: parm1 value: ng1 key: parm2 value: ng2 key: spawnscript value: common/2_point_patrol - close entity window. That's it. Upon spawning this trooper will roam between your 2 navgoals forever. NOTE: if you put him where he cannot see his navgoal, this won'r work, unless you create a network of waypoints, waipoints connected to each other. Link to comment Share on other sites More sharing options...
Markana Posted May 18, 2002 Share Posted May 18, 2002 Big thank you to Xcom! I've been wanting to get my troopers to patrol for ages and never knew how to do it - thanks. Link to comment Share on other sites More sharing options...
volrathxp Posted May 18, 2002 Share Posted May 18, 2002 xcom you're tha man Link to comment Share on other sites More sharing options...
RichDiesal Posted May 18, 2002 Share Posted May 18, 2002 Three cheers for XCOM! HIP HIP....! EDIT: Forgot to ask, if you use waypoints, so the waypoints need to be connected to the navgoal entities or just each other? Link to comment Share on other sites More sharing options...
Xcom Posted May 18, 2002 Share Posted May 18, 2002 Originally posted by RichDiesal Forgot to ask, if you use waypoints, so the waypoints need to be connected to the navgoal entities or just each other? IIRC, just each other. Each waypoint can be connected/targeted at other 2 waypoints (target and target2 keys in the entity window). If you have a complex level (with lotsa rooms and corridors), you must create a really huge waypoint network, assuming you want NPC's to be able to chase you and navigate thru the level. As to how to place them, you must visualise the NPC standing at the waypoint position, then place next one so he can see it and so on. ps: there is also common/4_point_patrol script. It works the same only you can 4 navgoals to patrol between. EDIT: made a lil pic to to explain better: http://home.planet.nl/~xcom/art/waypoints.gif Link to comment Share on other sites More sharing options...
G5_Wrath Posted May 23, 2002 Share Posted May 23, 2002 will it also stop them from jumpin around like monkeys on acid as they follow their waypoints while fighting you? : : : : : a rang dang diggiti dang da dang Link to comment Share on other sites More sharing options...
G5_Wrath Posted May 23, 2002 Share Posted May 23, 2002 BUMP!! Link to comment Share on other sites More sharing options...
Xcom Posted May 24, 2002 Share Posted May 24, 2002 Originally posted by G5_Wrath will it also stop them from jumpin around like monkeys on acid as they follow their waypoints while fighting you? No, at least I don't think so. Waypoints are for navigation only. They won't affect any behaviour. Link to comment Share on other sites More sharing options...
G5_Wrath Posted May 24, 2002 Share Posted May 24, 2002 so how do you control their behavior? Link to comment Share on other sites More sharing options...
Xcom Posted May 24, 2002 Share Posted May 24, 2002 It just occured to me that you might be referring to bots in MP. Their behavior you can't control. It's hard coded. In SinglePlayer there is some limited control over this which is done by scripting. Unfortunately, w/o tools and script definitions there isn't much I can tell about how to do it. Link to comment Share on other sites More sharing options...
RichDiesal Posted May 24, 2002 Share Posted May 24, 2002 Do you happen to know of any script where the NPCs just...walk? With 2_point_patrol they just run everywhere... I would make my own script, but I can't get the scripter to work (using the one from EF). Link to comment Share on other sites More sharing options...
Xcom Posted May 24, 2002 Share Posted May 24, 2002 Originally posted by RichDiesal Do you happen to know of any script where the NPCs just...walk? With 2_point_patrol they just run everywhere... I would make my own script, but I can't get the scripter to work (using the one from EF). AFAIK, they only run when they spot the enemy (YOU ) otherwise they just walk while patrolling. You can force them to walk only by setting set_walking to true and set_running to false (I think). Anyway, I dunno if there is an existing script which does that. Probably is but I am not going to decompille them all to find out. What you can do is write the script you want and I'll (try to) compile it for you. Link to comment Share on other sites More sharing options...
Cunnah Posted May 24, 2002 Share Posted May 24, 2002 i posted some info on NPCs and waypoints a while ago you need to used combat points, ill go look for the post and bump it, its called NPCs AI and fun battles! I think Link to comment Share on other sites More sharing options...
[RDH]Diversion Posted May 28, 2002 Share Posted May 28, 2002 Hey.. How can I make it so I go through a trigger and then the stormtroopers start walking the waypoint, but until then they are still. Link to comment Share on other sites More sharing options...
Xcom Posted May 28, 2002 Share Posted May 28, 2002 Assuming a) you can compile scripts b) you have waypoint_navgoal called ng1 c) you have NPC you should this. Give your NPC a NPC_targetname. key: NPC_targetname value: trooper1 (or whatever name you like) Create a trigger and target it at target_scriptrunner. This target_scriptrunner should have: key: usescript value: -!path to the script!- Basically, the value should point to the script which you wanna execute. The script looks like this: //Generated by BehavEd rem ( "Go to Navgoal" ); affect ( "trooper1", /*@AFFECT_TYPE*/ FLUSH ) { task ( "go1" ) { set ( /*@SET_TYPES*/ "SET_BEHAVIOR_STATE", /*@BSTATE_STRINGS*/ "BS_WALK" ); set ( /*@SET_TYPES*/ "SET_NAVGOAL", "ng1" ); } dowait ( "go1" ); } You will need to compile it to IBI. Right now it's only possible with Elite Force GDK toolset. Link to comment Share on other sites More sharing options...
[RDH]Diversion Posted May 28, 2002 Share Posted May 28, 2002 Wow, thanks man, just gotta find the tools now. Thanks! EDIT: Where do I find that Behaved tools? Link to comment Share on other sites More sharing options...
Xcom Posted May 28, 2002 Share Posted May 28, 2002 The JK2 scripting tools are yet to be released. EF tools can be used too but some ppl having trouble getting them to work w/o EF. LOL. For the link, go to General Editing forum and check "Radiant Resources" sticky thread. The link for EF GDK is there somewhere. Link to comment Share on other sites More sharing options...
RichDiesal Posted May 28, 2002 Share Posted May 28, 2002 Hmm... I think it's something to do with SourceSafe or the Source File Path... As is, my Source File Path points to a directory that doesn't exist... what is that? Also, I have no SourceSafe (can't use it in Radiant or in the Compiler)... is that something I'd need? (I don't know what it is. ) Link to comment Share on other sites More sharing options...
Xcom Posted May 28, 2002 Share Posted May 28, 2002 Do you have a directory called SourceForBehavED? Source File Path should point to it. If you don't have it, then your installation is incomplete. SourceSafe is, AFAIK, unimportant. (but I am not sure) Link to comment Share on other sites More sharing options...
jipe Posted May 28, 2002 Share Posted May 28, 2002 http://bansheestudios.hypermart.net/scriptx.IBI All credit to Xcom for the script (though it's not that complicated ) - all I did was compile it with the JO version of BehavEd. [Edit: I believe SourceSafe is used by Raven - some way to 'check out' scripts, making sure that only one person can access the file at a time. It's present in JKRadiant as well.] Link to comment Share on other sites More sharing options...
Xcom Posted May 28, 2002 Share Posted May 28, 2002 Huh? Is JO version released? WHERE? Link to comment Share on other sites More sharing options...
jipe Posted May 28, 2002 Share Posted May 28, 2002 I managed to get my hands on the SP tools. After reading a post elsewhere on these boards, I gather that the official release should hopefully be before the month is up (ie: this week). Link to comment Share on other sites More sharing options...
[RDH]Diversion Posted May 28, 2002 Share Posted May 28, 2002 Ahhh, you gotta tell us man! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.