Object Traits

An object has 2 different kinds of trait systems. general behavior traits and general traits. The former was already showcased in the previous chapter as GameObjectType. Besides this Object-Collab provides a bunch of options in the ObjectTraits builder which allows you to set general traits.

Game Object Type

ℹ️ triggerActivated is called on collision for particle effects regardless of the object already been triggered before. triggerObject is called when the object should execute trigger behavior.

⚠️ Using a class which can’t be casted to the base class of a GameObjectType should be considered UB as Geometry Dash tends to blindly cast based on the latter.

TypeBehaviorBase ClassActivation Method
SolidAn object which is solid & lethal to touch from the sides.GameObjectcollidedByPlayer
HazardAn object which is lethal to touch.GameObjectcollidedByPlayer
InverseGravityPortalAn object which inverses gravity on touch.EffectGameObjectactivatedByPlayer
NormalGravityPortalAn object which sets the gravity back to normal on touch.EffectGameObjectactivatedByPlayer
ShipPortalAn object which turns the player into a ship on touch.EffectGameObjectactivatedByPlayer
CubePortalAn object which turns the player into a cube on touch.EffectGameObjectactivatedByPlayer
DecorationAn object with no hitbox.GameObjectN.A.
YellowJumpPadAn object which gives the player a medium boost on touch.EffectGameObjectactivatedByPlayer
PinkJumpPadAn object which gives the player a small boost on touch.EffectGameObjectactivatedByPlayer
GravityPadAn object which flips the gravity on touch.EffectGameObjectactivatedByPlayer
YellowJumpRingAn object which gives the player a medium boost on click.RingObjectactivatedByPlayer
PinkJumpRingAn object which gives the player a small boost on click.RingObjectactivatedByPlayer
GravityRingAn object which flips the gravity on click.RingObjectactivatedByPlayer
InverseMirrorPortalAn object which mirrors the level on touch.EffectGameObjecttriggerActivated
NormalMirrorPortalAn object which undoes the level mirror effect on touch.EffectGameObjecttriggerActivated
BallPortalAn object which turns the player into a ball on touch.EffectGameObjectactivatedByPlayer
RegularSizePortalAn object which turns the player into the regular size on touch.EffectGameObjectactivatedByPlayer
MiniSizePortalAn object which turns the player into the mini size on touch.EffectGameObjectactivatedByPlayer
UfoPortalAn object which turns the player into a UFO on touch.EffectGameObjectactivatedByPlayer
ModifierAn object which functions as a trigger or speed portal.EffectGameObjecttriggerActivated/triggerObject
BreakableAn object which is solid on the top, breakable on touch from any other size.GameObjectcollidedByPlayer
SecretCoinAn object which counts as a secret coin (It’s not recommended to use this).EffectGameObjecttriggerActivated/triggerObject
DualPortalAn object which turns the player into a dual on touch.EffectGameObjecttriggerActivated
SoloPortalAn object which turns the player into a solo on touch.EffectGameObjecttriggerActivated
SlopeAn object which has a sloped hitbox & is lethal to touch from the side.GameObjectcollidedByPlayer
WavePortalAn object which turns the player into a wave on touch.EffectGameObjectactivatedByPlayer
RobotPortalAn object which turns the player into a robot on touch.EffectGameObjectactivatedByPlayer
TeleportPortalAn object which teleports the player to a tethered object on touch.TeleportPortalObjectactivatedByPlayer
GreenRingAn object which flips gravity & gives the player a medium boost on click.RingObjectactivatedByPlayer
CollectibleAn object which can be collected on touch.EffectGameObjecttriggerActivated/triggerObject
UserCoinAn object which counts as a user coin (It’s not recommended to use this).EffectGameObjecttriggerActivated/triggerObject
DropRingAn object which gives the player an extra large downwards boost on click.RingObjectactivatedByPlayer
SpiderPortalAn object which turns the player into a spider on touch.EffectGameObjectactivatedByPlayer
RedJumpPadAn object which gives the player a large boost on touch.EffectGameObjectactivatedByPlayer
RedJumpRingAn object which gives the player a large boost on click.RingObjectactivatedByPlayer
CustomRingAn object which can be jumped on to trigger.RingObjectactivatedByPlayer
DashRingAn object which makes the player dash into a direction on hold.DashRingObjectactivatedByPlayer
GravityDashRingAn object which makes the player dash into a direction while swapping gravity on hold.DashRingObjectactivatedByPlayer
CollisionObjectAn object which reports a collision from a given block ID (Unsupported).EffectGameObjectN.A.
SpecialAn object which triggers when touched (Unsupported).EffectGameObjectN.A.
SwingPortalAn object which turns the player into a swing on touch.EffectGameObjectactivatedByPlayer
GravityTogglePortalAn object which flips gravity on touch.EffectGameObjectactivatedByPlayer
SpiderOrbAn object which teleports the player to the nearest surface on click.RingObjectactivatedByPlayer
SpiderPadAn object which teleports the player to the nearest surface on touch.EffectGameObjectactivatedByPlayer
EnterEffectObjectAn object which spawns all objects in an area.EnterEffectObjecttriggerActivated/triggerObject
TeleportOrbAn object which teleports the player to a targeted object using the target group ID.TeleportPortalObjectactivatedByPlayer
AnimatedHazardAn object which is lethal to touch.AnimatedGameObjectcollidedByPlayer

Traits

These are options in the ObjectTraits which can be set during the construction of the object to define behavior depending on the value. These should all be filled correctly to ensure that the game handles the object correctly.

MethodBehaviorBase ClassGame Object TypeDefault
gameObjectTypeThe type of object, this copies some standard properties of the specified object type.GameObjectN.A.GameObjectType::Solid
defaultMainColorIDGets the default main color ID given when the object is created, 0 = color disabled.GameObjectN.A.1004
defaultZLayerThe default z layer given when the object is created.GameObjectN.A.ZLayer::Default
defaultZOrderThe default z order given when the object is created.GameObjectN.A.2
speedModGets the speed mod of the object to apply to the gameplay.EffectGameObjectModifier0
canRotateFreeIf the object can be rotated without 90deg snapping (Unsupported).GameObjectN.A.false
ignoreEditorDurationIf the trigger duration handling should be removed.EffectGameObjectModifierfalse
isColorTriggerIf the trigger can affect color channels.EffectGameObjectModifierfalse
isSpawnableTriggerIf the trigger can be spawned.EffectGameObjectModifiertrue
isStoppableTriggerIf the trigger can be manipulated by a stop trigger.EffectGameObjectModifiertrue
isEditorSpawnableTriggerIf the trigger should be simulated in the editor.EffectGameObjectModifiertrue
isSpeedObjectIf the object can change the gameplay speed (Unsupported).EffectGameObjectModifierfalse
isEditorReservedIf the play layer should ignore this object as its reserved for the editor.GameObjectN.A.false
omitTrashTextureIf the object should be omitted from rendering in the custom delete & delete all buttons.GameObjectN.A.false
shouldLockXIf the object can be affected by move triggers on the X axis.GameObjectN.A.false
shouldNotHideAnimFreezeIf the object should disable once the animation freezes.EnhancedGameObjectN.A.false
usesFreezeAnimationIf the object uses an animation with a delayed start.EnhancedGameObjectN.A.false
usesSpecialAnimationIf the object is animated.EnhancedGameObjectN.A.false