Last active
September 9, 2022 23:08
-
-
Save rpaladin/906d1a2cc281a5266617d23cd63b69f6 to your computer and use it in GitHub Desktop.
UPBGE to Armory3D - Scripting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPBGE to Armory3D - Scripting |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trace("Hello World"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print("Hello World") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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