• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Deactivation of Objects

N

NoFontNL

Guest
Hi, I have my view, and everything outside my view gets deactivated.
upload_2019-6-29_12-1-10.png
But the problem is, I have a 'par_solid' object and an object that is amazingly high.
upload_2019-6-29_12-3-0.png
The pink is solid and the orange thing is the high thing.

The player's position is the middle of the view.

As you can see the solid object is outside the view and gets deactivated,
which will result in the high object falling down, which is not intended.

When the high thing is colliding (literally touching) with a par_solid, the high thing gets destroyed.

I already tried instance_activate_region(bbox_left,bbox_bottom,sprite_width,vspd) inside the high thing,
but that doesn't seem to work.

How would I fix this?

Help would be appreciated.
 

Relic

Member
Is the high thing activation code performed just after the deactivation code based on the view? Wondering if, due to the order of instances, that you don’t activate when actually required.

You should be handling activation using some controller that doesn’t do it every step (wasted cpu) - with that high object activation being part of the process.
 
N

NoFontNL

Guest
The deactivation code is in obCamera step
and the activation code in high thing is in End step
 

samspade

Member
You might need to have two types of deactivations. Deactivate once to remove objects not in view, deactivate again to remove platforms. For objects you can remove them if they aren't in view, for platforms, you could expand that range or do a check to see if any tall objects are using them or something else.
 
Top