Good morning everyone. I would like to know how (and if it possible) run a custom script every time the player dies. I currently work on a project for Android and I would like to pop an ad video every time the player will die in my game. Is it possible to do so? If yes, how can I do it?
I know how to do it in "normal" code but as everything is set up by the framework, how can I integrate the ad script?
Many thanks beforehand for your help.
Yes, there is a Death Setting in Combatants->Combatants but I can't see where I can run my custom script.
There are few option to tick: "No Revive", "Leave on death", "Keep Prefabs", "Sympathy change", "Earn log text".
Then there is "Variable changes"->Variable Origin that could be Global Combatant or Spawner and then you can add a new Change variable that could be Value, Game value, Player Prefs or Scene Name.
I really can't see the option to run a custom script.
Can you please tell me how can you do it?
Many thanks
In case you don't didn't go through the game tutorials yet, I'd highly recommend doing so, as all these basic ORK workflow/knowledge things are explained there :)
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I would like to make a game for Android and I would like to use a control from Control Freak 2 (https://www.assetstore.unity3d.com/en/#!/content/11562).
As your character is set up by a framework using DLL and not proper c# code, is it possible the integration of my "custom" control instead of the "standard" control from the framework?
Thanks again for your answer.
Set up an input key using the Custom input origin, this allows you to define static functions for button and axis values through reflection. Depending on how Control Freak 2 works, you might need to write a small wrapper class with compatible functions.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!