Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

NPC Trouble

Page: 1 of 1
 Mr. Chopper
03-06-2004, 9:07 PM
#1
Problem: I place an NPC Stormtrooper in my map. He stands still, just turns around and shoots at me. I place a reborn NPC in the same map, and he jumps around, and moves and chases me and stuff. I want the Stormtrooper to do the same thing. I should probably also mention I made a script for the NPC that I think might work, but have absolutely no idea how to make it and the NPC interact.

Solution: __________________________________
 Mercenary
03-06-2004, 9:55 PM
#2
I answered your thread on map-center, certain NPCs need a network of waypoints with point_combats to move around and fight. Some NPCs won't move around at all without a script. Ford Dye posted a complete tutorial on map-center.
 Mr. Chopper
03-07-2004, 12:03 AM
#3
You're right, he did.... and I already have a script. But I don't know how to make it interact with the stormtrooper npc.... that's my problem right now. Though I probably missed it, I didn't see in the tutorial any examples of linking scripts to npc's.:confused:
 Mr. Chopper
03-07-2004, 4:35 AM
#4
Ok, progress. I got the script written, and I think/hope it'll work for the npc.... here it is. flush ( );

affect ( "hyttrooper", /*@AFFECT_TYPE*/ FLUSH )
{
set ( "set_walking", "true" );
set ( "set_behaviorstate", "bs_default" );
set ( "set_chase_enemies", "true" );
set ( "set_look_for_enemies", "true" );
}I don't think it's working, so either my code is bad, or it's STILL not talking to the NPC.:mad:
 lassev
03-07-2004, 8:21 AM
#5
Actually I think all of the commands in your script belong to the default "personality" of stormtroopers. Although you might get better results with running than by walking.

To use that script, you gotta give the NPCs a spawnscript (or affect them later). If you use it as a spawnscript, you don't need the affect command in your script. To give a spawnscript, type in the entity properties:

spawnscript
mymapname/spawnscriptname

Don't add the .ibi to the end of the file name in Radiant entity properties, even if it's a part of the compiled script name. That path of course assumes the script is located in a subfolder named after your map in the scripts folder.

More critical than that next to useless script are however, as Mercenary mentioned, the point_combats (locations the STs will use as optimal hiding / shooting places) and a waypoint networks connecting the point_combats to each other (or any two or more places for that matter).
 Jedi_Vogel
03-08-2004, 7:44 AM
#6
Ford Dye posted a complete tutorial on map-center

I don't know if this is another forum or what it is, but if someone could let me have the link to that I would be very grateful :)
 Mercenary
03-08-2004, 8:54 AM
#7
Raven and Jesterspaz of Raven Software posted a lot of sticky threads explaining all kinds of editing stuff related to JA. There are a few professionals who are regulars on map-center forums.

http://www.map-center.com/)
 Jedi_Vogel
03-08-2004, 4:01 PM
#8
Thanks :) That could be a source of further research instead of me annoying people on either forum, just search and stuff.

*points to him* He was helpful and I asked him for the link, he wasn't advertising. :)

Really, thank you :)
Page: 1 of 1