lfnetwork.com mark read register faq members calendar

Thread: NPC atacking another NPC
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 02-08-2009, 08:38 AM   #1
Ravager
Rookie
 
Ravager's Avatar
 
Join Date: Dec 2007
Location: Poland, Wroclaw
Posts: 38
NPC atacking another NPC

Hi!

I want to make npc who will attack another npc by script. Somebody can tell me how it should look like?
Ravager is offline   you may: quote & reply,
Old 02-08-2009, 09:56 AM   #2
Canderis
Mercenary
 
Canderis's Avatar
 
Join Date: Jun 2008
Location: Unknown
Posts: 2,509
Current Game: Skyrim
Veteran Modder Helpful! 
You would use somthing like this:
Code:
void main() {
 object oNPC1=GetObjectByTag("npc 1 here");
 object oNPC2=GetObjectByTag("npc 2 here");
 ChangeToStandardFaction(oNPC1, STANDARD_FACTION_PREY);
 ChangeToStandardFaction(oNPC2, STANDARD_FACTION_PREDATOR);
}




Canderis is offline   you may: quote & reply,
Old 02-08-2009, 10:09 AM   #3
Ravager
Rookie
 
Ravager's Avatar
 
Join Date: Dec 2007
Location: Poland, Wroclaw
Posts: 38
Thanks. I didnt know about this prey/predator thing ;d
Ravager is offline   you may: quote & reply,
Old 02-08-2009, 10:13 AM   #4
Canderis
Mercenary
 
Canderis's Avatar
 
Join Date: Jun 2008
Location: Unknown
Posts: 2,509
Current Game: Skyrim
Veteran Modder Helpful! 
Is one of the people a party member? If so you will need to change back to his/her original faction.




Canderis is offline   you may: quote & reply,
Old 02-10-2009, 11:56 AM   #5
Ravager
Rookie
 
Ravager's Avatar
 
Join Date: Dec 2007
Location: Poland, Wroclaw
Posts: 38
I dont want to make another topic so i am writing here.

I want to fire conversation after NPC spawn. I have script but i dont know where can i put this. I tried to add this to OnEnter but it dont work.
Ravager is offline   you may: quote & reply,
Old 02-10-2009, 02:33 PM   #6
Star Admiral
N7 Commando
 
Star Admiral's Avatar
 
Join Date: Oct 2008
Location: Omega 4 Relay
Posts: 656
Current Game: Mass Effect 2
Folder extraordinaire Helpful! 
I believe that inside the utc for the NPC, there is a entry OnSpawn. You'll put your script name in that category.

- Star Admiral
Star Admiral is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > Knights of the Old Republic > Editing / Modding > Holowan Laboratories > NPC atacking another NPC

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:01 PM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.