Hi! I'm Antikore and today I will explain you a concept that you can apply to your games.
Empty Objects, or also known as EOs is basically any object in a PB game (enemy, item, projectiles etc.) that have been modified to be completly reduced into their minimum expression. This is a very useful technique even used back in old PB days.
First of all, the requirements that an object should have to be considered an EO:
- Should no have texture, or not explicitly a texture (Something like a quick custom particle effect could still be considered an EO)
- Their PB basic functions for the type should be extremely limited: An invisible, ignoring environment, motionless and invincible enemy its considered an EO
Now, lets see old-school and modern uses:
The first uses for EOs were back when commads didn't even exist. Basically, items were being used as an EO and they could be used similarly to what nowadays cmd blocks are used for.
These generally were invisible, with no collecting animation, nor scoring. Could be used for triggering stuff. I think IGP used this a lot ago.
After a couple versions, in CC I've used a EO projectile for making the campfire. Its a non-damaging, invisible projectile, which just goes upwards and fades away, spawning smoke particles over it, to create the effect.
Nowadays, the most useful EOs are definitely EO Enemies, for example, the tutorial I've made recently about three-bullet gun uses an EO Enemy.
Here are a couple of simple uses for EOs:
1.- Enemy Shooting RandomizerUsing this time an EO projectile, we can make an enemy shoot randomly. How?
Create an enemy, and then make an invisible, harmless, non-sound projectile. And add it as primary projectile for the enemy, then the secondary put the projectile you want to shoot originally, and set the chance for it. (This was used in the making of the space invaders recreation)
2.- Gun ShrpanelsThis can be used in multiple ways, but this is an example. So, this time making a projectile that after a time will explode into multiple pellets. Using an EO Enemy, you can just spawn the enemy over the projectile in the life out cp, configure the enemy to shoot projectiles as normal, then do this.
//Create CP- EO Enemy for Sharpnels
//This is for the eoing
enemy = ignore environment
enemy visible = false
//Loop CP- EO Enemy for Shrapnels
enemy = fire
//Fire CP - EO Enemy for Shrapnels
remove enemy
The enemy won't be percepted by the player, and it just fires the primary projectiles as the explosion. (I didn't tested this code directly, I've used this in the past but I wrote it here by memory, if doesn't work, probably delaying the fire will fix it, by having a variable that sums when loop, and if it reaches 1 execute it. Like 1 frame separation)
I have more examples, one of them is the three-shooting pistol, but most of them are too complex. (cof cof mouse latern for terror games)
Hope this concept helps you to make even better games. You can give your own examples if you have used this in the past, too.