-
Notifications
You must be signed in to change notification settings - Fork 2
Adding a new chaos tile effect
lafitteque edited this page Nov 30, 2024
·
2 revisions
Your effect should be a scene with a script on the root. This script needs to have a function activate() that is called when the tile is destroyed. Use it to modify the game as you want. When the effect is finished, call get_parent().request_queue_free()
Simply use the following line with your effect name (should be your .tscn file name) inside your modInit:
get_node("/root/ModLoader/POModder-AllYouCanMine").data_mod.addChaosEffect(effectName: String)
Add your effect like follows :
var myEffect = preload(pathToYourEffect) myEffect.take_over_path("res://mods-unpacked/POModder-AllYouCanMine/content/ChaosTile/effectName")