Jump to content

Welcome to Obsidian Forum Community
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. If you already have an account, login here - otherwise create an account for free today!
Photo

Script on death of NPC


  • Please log in to reply
6 replies to this topic

#1
peardox

peardox

    (5) Thaumaturgist

  • Members
  • 540 posts
  • Location:Manchester, UK
  • Deadfire Backer

Anyway I can do this?

 

When a SPECIFIC NPC dies (as per printInstance oei_hovered) I wanna trigger a Teleport 

 



#2
BMac

BMac

    Programmer

  • Developers
  • 350 posts
  • Lords of the Eastern Reach Backer

There is a ScriptEventType called OnDeath that we can hook up scripts to on character prefabs - but that's in the Unity object data.  Maybe you could do something with an ability with a status effect that triggers on death?  You could grant the ability to the character by modding its progression table or with a ModScriptHookGameData.


  • peardox likes this

#3
peardox

peardox

    (5) Thaumaturgist

  • Members
  • 540 posts
  • Location:Manchester, UK
  • Deadfire Backer

You mean something like this would work?

 

Junk ID in sample

 

OBS will hate this Mod :)

 

Kill a random person in Neketaka and something happens :)

 

Snippet...

"Conditional": {
	"Operator": 0,
	"Components": [
		{
			"$type": "OEIFormats.FlowCharts.ConditionalCall, OEIFormats",
			"Data": {
				"FullName": "Boolean IsInActiveScene(Guid)",
				"Parameters": [
					"00000000-0000-0000-0000-000000000000"
				]
			},
			"Not": false,
			"Operator": 0
		}, {
			"$type": "OEIFormats.FlowCharts.ConditionalCall, OEIFormats",
			"Data": {
				"FullName": "Boolean IsDead(Guid)",
				"Parameters": [
					"00000000-0000-0000-0000-000000000000"
				]
			},
			"Not": false,
			"Operator": 0
		}
		
	]
},


Edited by peardox, 14 September 2018 - 05:06 AM.


#4
peardox

peardox

    (5) Thaumaturgist

  • Members
  • 540 posts
  • Location:Manchester, UK
  • Deadfire Backer

Cool

 

Been experimenting...

 

I kill a friendly and trigger a LootList :)

 

This is part of a DeathMatch concept I have - we have no multi-player so I wanted to do something similar

 

Now...

 

The reward - gotta be a good one

 

I was thinking of skipping you straight to endgame - nahh - lets make that one harder :)

 

I'll do a shed load of coin for it - works for now

 

I've mentioned this in a sticky thread - it's a fun idea

 

Only I know who to kill - everyone else has to go mass-kill everyone in Queen's Berth

 

I'll try it out now

 

(had to switch the "Not") 



#5
peardox

peardox

    (5) Thaumaturgist

  • Members
  • 540 posts
  • Location:Manchester, UK
  • Deadfire Backer

I need a statuseffect for ondeath ...

 

I went with an Assassin Mod (just finished it)

 

Gave some random NPC about 1 million cash to carry (slightly under)

 

I need the statuseffect to show the Modal I guess

 

Can you poss gimme a sample of a death triggering a statuseffect? Lack of dox makes working it out by yourself stressful.

 

On the bright side - I've got a functional Mod that gives you a load of cash

 

The mod is designed to be dark - not telling anyone who has the cash, simply that they have a LOT :)

 

Deathmatch + loads of rep loss - will be great fun for ppl who have completed the game

 

Couldn't have done it without the Mod Hooks (thx for those)



#6
peardox

peardox

    (5) Thaumaturgist

  • Members
  • 540 posts
  • Location:Manchester, UK
  • Deadfire Backer

This is fun (caring for our team screws me doing Mods)

 

https://www.nexusmod...nity2/mods/220/

 

I'll only tell OBS + the team who the target is

 

The result of this one is inventive (really need to do more Mods)

 

Check the mod out - it's not perfect but defo works

 

@BMac - the OnDeath - can't trigger it, big plans for that one...



#7
peardox

peardox

    (5) Thaumaturgist

  • Members
  • 540 posts
  • Location:Manchester, UK
  • Deadfire Backer

Well - this one's tanking!

 

I'll have to hit the feel-good stuff again and ignore reality I guess






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users