Skip to content

Instantly share code, notes, and snippets.

@rpaladin
Last active September 9, 2022 23:08
Show Gist options
  • Save rpaladin/906d1a2cc281a5266617d23cd63b69f6 to your computer and use it in GitHub Desktop.
Save rpaladin/906d1a2cc281a5266617d23cd63b69f6 to your computer and use it in GitHub Desktop.
UPBGE to Armory3D - Scripting
UPBGE to Armory3D - Scripting
trace("Hello World");
package arm;
import iron.Scene;
class MyTrait extends iron.Trait {
public function new() {
super();
// Delete object via active scene children
iron.Scene.active.getChild("Your_Object").remove();
}
print("Hello World")
import bge
def script_name(self)
# Delete object via script owner
self.owner.endObject()
# Delete object via script owner's active scene children
self.owner.scene.objects["Your_Object"].endObject()
# Delete object via active scene children
bge.logic.getCurrentScene().objects["Your_Object"].endObject()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment