I really should be able to figure this out, but what I want is when the player defeats a boss enemy in combat (defeated meaning <0 hp and no nearby allies of the boss alive), the boss changes to a neutral faction and speaks to the pc.
Start conversation when enemy defeated
#1
Posté 31 octobre 2015 - 06:03
#2
Posté 31 octobre 2015 - 06:55
Several ways to do it. One way is to first turn on the "immortal" property for the NPC. The NPC will lose health when hit, but can't reach less than 0 as you specify -- it can only reach 0 and remain at 0 until the immortal property is turned off. Then have a script check the NPC's HP, and switch the faction, end combat, and initiate conversation. You can put the script in On Damaged, or other places.
I put the script in the On User Defined slot, using the On End Combat Round event signal. I first used the SurrenderAllToEnemies() function from "x0_i0_partywide", and then switched the faction to Commoner, healed the NPC, and fired a conversation using CreateIPSpeaker().
#3
Posté 31 octobre 2015 - 09:06
It helps when I put my scripts in the onDamaged instead of onDeath... Doh! ![]()
#4
Posté 31 octobre 2015 - 09:49
script on on death, and dont forget to use "surrender to ennemies" on what ever it sspelled.
Also if the object is destroyed it can' t execute script. On on death it 's better to call an ExecuteScript on module or the area on the on death event especially if you make use of a Delay. You execute the script on the module, and put the delay inside that script.
#5
Posté 02 novembre 2015 - 06:02
- GCoyote aime ceci





Retour en haut







