Making an NPC go hostile and attack
#1
Posted 22 November 2004 - 01:03 PM
I'm kind of confused on that subject...
#2
Posted 22 November 2004 - 01:28 PM
ActionOverride("scriptname",Enemy())
The actual fighting and spellcasting and whatnot should be handled by their scripts.
Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.
____
The Gibberlings Three - Home of IE Mods
The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.
#4
Posted 22 November 2004 - 01:31 PM
Khadion NPC mod - Team leader, head designer
Hubelpot NPC mod - Team leader, coder
NPC Damage - Coder
PC Soundsets - Coder, voice actor
Brythe NPC mod - Designer
DragonLance TC - Glory of Istar - Designer
The NPC Interaction Expansion Project - Writer for Cernd, Sarevok
The Jerry Zinger Show - Producer
Iron Modder 5 - Winner
#5
Posted 22 November 2004 - 01:47 PM
#6
Posted 22 November 2004 - 01:53 PM
ActionOverride("creature1",Enemy()) ActionOverride("creature2",Enemy()) ActionOverride("creature3",Enemy()) ActionOverride("creature4",Enemy())
Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.
____
The Gibberlings Three - Home of IE Mods
The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.
#7
Posted 22 November 2004 - 02:15 PM
SetGlobal("GoHostile","MYAREA",1) in the dialog.
IF
Global("GoHostile","MYAREA",1)
!Allegiance(Myself,ENEMY)
THEN
RESPONSE #100
Enemy()
END
I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. - Umberto Eco
The truth of #meeting:
KenTeamBG: a/s/l
Deano: 14/f/in ur heart
* KenTeamBG it's getting hot so i remove my jacket
Daxziz: Oooh
* Echon, MaxTeamBG and Hlidskialf all get naked.
* SimDing0 has joined #meeting
SimDing0: Eew.
* SimDing0 has left #meeting
* KenTeamBG sets mode: +b SimDing0
#8
Posted 23 November 2004 - 04:06 PM
IF
Global("GoHostile","AR0400",1)
THEN
RESPONSE #100
ActionOverride("r#knive",Enemy())
ActionOverride("r#knive",Enemy())
ActionOverride("r#knive",Enemy())
ActionOverride("r#knive",Enemy())
ActionOverride("r#knive",Enemy())
ActionOverride("r#sven",Enemy())
END
Does that look alright?
I couldn't get Potencius' to work, sorry.
Edited by Blitz, 23 November 2004 - 04:20 PM.
#9
Posted 23 November 2004 - 04:31 PM
ActionOverride("NKNIVE",Enemy())
ActionOverride("NKNIVER",Enemy())
ActionOverride("NKNIVER",Enemy())
ActionOverride("NKNIVER",Enemy())
I used this (surronding code not shown, but don't worry, it worked)
I have three "copies" of an NPC fighter with death variable KNIVER and one captain with KNIVE.
This made the captain and only one fighter go hostile.
What did I do wrong? Perhaps I misunderstood your instructions?
#10
Posted 23 November 2004 - 05:59 PM
Change the death variables of the fighters to NKNIVER1, NKNIVER2, and NKNIVER3, and change the Enemy() code accordingly. It should work then. Right now, the game is just referencing the same .cre three times.That didn't work, but this KINDA did.
ActionOverride("NKNIVE",Enemy())
ActionOverride("NKNIVER",Enemy())
ActionOverride("NKNIVER",Enemy())
ActionOverride("NKNIVER",Enemy())
I used this (surronding code not shown, but don't worry, it worked)
I have three "copies" of an NPC fighter with death variable KNIVER and one captain with KNIVE.
This made the captain and only one fighter go hostile.
What did I do wrong? Perhaps I misunderstood your instructions?
#11
Posted 23 November 2004 - 07:13 PM
~Blah, blah. Let's fight.~
IF ~~ THEN DO ~SetGlobal("LetsFight","GLOBAL",1)~
EXIT
END
Then, I make a .baf and assign it to the little goons' .cre. In that .baf file, it would say something like this:
IF
Global("LetsFight","GLOBAL",1)
Global("FightOn","LOCALS",0)
THEN
RESPONSE #100
SetGlobal("FightOn","LOCALS",1)
Enemy()
END
This allows other scripts to check for the LetsFight Global to be 1. You can either make the leader an enemy in the dialogue or add a similar block of code to his .baf.
Sillara
P.S. Sorry if that was just confusing rather than helpful.
#12
Posted 23 November 2004 - 07:26 PM
Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.
____
The Gibberlings Three - Home of IE Mods
The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.