Skip to content

Adding a new chaos tile effect

lafitteque edited this page Nov 30, 2024 · 2 revisions

Add a new chaos tile effect

Creating your effect

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()

Registering your effect

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)

Adding the effect to the chaos folder

Add your effect like follows :

var myEffect = preload(pathToYourEffect) myEffect.take_over_path("res://mods-unpacked/POModder-AllYouCanMine/content/ChaosTile/effectName")