|
Post by christougher on Dec 21, 2016 14:27:14 GMT
I own (and love!) both of these plugins. I was wondering what the simplest (and most efficient!) way of having killable trigger a MasterAudio clip group to play when damaged or dying. Would love it if the functionality was build right in to killable. Thx.
|
|
|
Post by DarkTonic Dev on Dec 21, 2016 17:14:51 GMT
When dying, you can use an EventSounds component on the game object, Disabled event, to play a Sound Group.
When damaged, if it spawns a single damage prefab, you could use EventSounds on the damage prefab with Enabled event to play something.
Otherwise you can use a KillableListener subclass to do whatever you want with the API. I have on the roadmap to make this possible without writing code, but there are several features in front of that, so it will be awhile.
|
|
|
Post by christougher on Dec 22, 2016 4:28:55 GMT
Hi, one problem with doing it with disable is that the sounds occur at scene start as CGK Poolboss creates then disables the gameobjects. A quick fix is to just start with it disabled and turn it one with playmaker I suppose...
|
|
|
Post by DarkTonic Dev on Dec 22, 2016 5:41:32 GMT
Hi, one problem with doing it with disable is that the sounds occur at scene start as CGK Poolboss creates then disables the gameobjects. A quick fix is to just start with it disabled and turn it one with playmaker I suppose... Oh weird, I hadn't thought about that. May be fixable by changing the ScriptExecutionOrder. Just use the Despawned event instead, that will work.
|
|