feat: add initial People Playground mod development kit
This commit is contained in:
14
extracted_wiki_content/snippets/activation_action.txt
Normal file
14
extracted_wiki_content/snippets/activation_action.txt
Normal file
@@ -0,0 +1,14 @@
|
||||
URL: https://wiki.studiominus.nl/snippets/activation.html
|
||||
Title: People Playground Modding - Activation action
|
||||
==================================================
|
||||
|
||||
Activation action
|
||||
This code snippet shows how to execute code when the player activates the object.
|
||||
//add a built-in component that invokes a delegate when the item receives an activation signal
|
||||
Instance.AddComponent<UseEventTrigger>().Action = () =>
|
||||
{
|
||||
//everything inside this delegate will be executed
|
||||
|
||||
//show a notification to the player
|
||||
ModAPI.Notify("I'VE BEEN USED!");
|
||||
};
|
||||
Reference in New Issue
Block a user