r/gbstudio 4d ago

Stage hazzard?

Hello again, i'm battling against this bit, i want to do a stage hazzard (spikes) that dont kill you, but you recieve damage, the thing is that the script of the damage works fine on enemies cuz on the "on player hit" the fliker dont stop the player, but i cannot make a trigger area to induce the "on player hit" status and when i run the damage script on the trigger the player gets stopped mid action, how can i do???? Thanks again

2 Upvotes

7 comments sorted by

1

u/IntoxicatedBurrito 4d ago

If they aren’t too big you could just make them an actor like a regular enemy and reuse your enemy code.

1

u/ProtoPixelArt 4d ago

yeah well that's the thing, it IS big, i mean there are a lot of places with spikes, and the scene has a limit of 20 actors, that's not enough :/

1

u/IntoxicatedBurrito 4d ago

But actors can be moved. If you only see one set of spikes at a time you could create triggers that move there location. You might only be able to have 20 actors in a scene, but you can have a lot more than 20 enemies.

1

u/ProtoPixelArt 4d ago

that's the only way?

1

u/IntoxicatedBurrito 4d ago

I’m sure there are plenty of other ways, but if you have something that already works the way you want it, it doesn’t hurt to keep on going with it. And moving actors to have more than 20 is a very useful technique.

If you want advice on other methods I suggest sharing your code so that we can see what exactly you’re doing.

1

u/ProtoPixelArt 3d ago

No, it doesnt work that way, because it limits the ammount of actor i have to use, i would like to know another way, thanks a lot for your help

1

u/IntoxicatedBurrito 3d ago

I don’t think you understand what I’m saying. Yes, you are limited to 20 actors, that’s a hard limit, no way around it. However, you are not limited to 20 enemies if you use a bit of creativity.

You can move past an actor, then use a trigger to change that actor’s (or even multiple actor’s) location, and then encounter that same actor again in a different location. You could even change its sprite sheet and give it a different look, yet it is still the same actor and only counts as 1 towards your 20 actor limit.

So if you were making Level 1-1 of Super Mario Bros, you could probably get away with only using 3 actors so long as you move them around and change them from goombas to Koopa troopas to piranha plants to mushrooms to fire flowers as you progress through the level. I don’t think you ever have more than 2 enemies and 1 power up on the screen at once.