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.

How do I make a stormtrooper NPC friendly?

Page: 1 of 1
 LordP
11-11-2003, 9:33 PM
#1
WHen I put the stormtrooper NPC in my map he always starts shooting at me. How can I make him so he is friendly? (Multiplayer)
 idontlikegeorge
11-12-2003, 2:00 AM
#2
To make usual enemy NPCs to not attack the player, either the player's team needs to be changed, or the NPC's needs to be.

Usually, for specific NPCs in a map, this one done with a script... like the bad guys in the Jedi Outcast bar.
 LordP
11-12-2003, 8:41 PM
#3
Well I have tried a few different NPC's in my map, and the stormtrooper seems to be the only one who attacks me. (Jan and the imperial officer dont).
 ondrahosek
11-13-2003, 2:33 PM
#4
Create a new text file, name it stormtrooper.npc and fill it with this:

StormTrooper
{
playerModel stormtrooper
weapon WP_BLASTER
health 30
headPitchRangeDown 30
reactions 3
aim 1
move 3
aggression 3
evasion 1
intelligence 5
rank crewman
playerTeam TEAM_PLAYER
enemyTeam TEAM_ENEMY
// race klingon
class CLASS_STORMTROOPER
height 64
crouchheight 38
walkSpeed 51
runSpeed 200
snd st1
sndcombat st1
sndextra st1
yawspeed 70
walkSpeed 55
runSpeed 200
dismemberProbHead 0
dismemberProbArms 10
dismemberProbLegs 0
dismemberProbHands 20
dismemberProbWaist 0
}


Put it under ext_data\npcs\ into a pk3 file and start the game. The trooper shouldn't shoot you anymore.

The magic is done by the lines "playerTeam" and "enemyTeam".

NOTE: delete the pk3 or rename it to .zip, or the stormtroopers will be allied with you throughout the game.
 LordP
11-13-2003, 7:48 PM
#5
awesome. Thanks!
 LordP
11-13-2003, 8:02 PM
#6
Hmmm I tried the script in the pk3 and in a seperate pk3 but there must be somthing wrong with it because when I go into my map the console tells me it can't spawn a stormtrooper. Is this for MP or just Single player?
Page: 1 of 1