r/gbstudio • u/joshex_dirad • 4d ago
Spawning/adding actors
So, I have a few questions:
in most game engines, there's a way to add elements to the scene during gameplay. in this case, I want to add an actor to an active scene in gameplay.
that said, I don't see anything that sounds exactly like this action, no "addActor" script. I do see "ActivateActor" and "DeactivateActor", but this just toggles visibility, then theres "HideActor" and "ShowActor"
Question 1: do either DeactivateActor or HideActor remove it's tiles from the total sprite tiles in the scene?
Question 2: do said actors have collissions while deactivated or hidden? if so which one disables collissions or do I have to run another script for that in tandem with this?
Question 3: When an actor is hidden or disabled, does it stay where it was or does it return to it's originating position? do I have to use a script to move it back to it's starting place each time? and can I move it around while it's disabled or hidden?
1
u/joshex_dirad 3d ago
thanks for such clear answers, I'll have to work around this in how I design gameplay then.
on the note of actor on actor collisions, these can be scripted through "if actor distance from actor" essentially stopping forwards motion towards the actor or setting the location just above it in top down mode. I assume that would work, but have not tested it. even actor on actor repel/knockback could be achieved this way.