I want tags for all kind of objects, these will allow to check for these in command blocks etc.
Each enemy, item, projectile etc will have a little textbox which can be filled up with tags like this:
blaarg jumpingEnemy killedByDeadRays
Then we can have a command block that checks for example, for enemies and inside this code
if tag = jumpingEnemy
{
//Do things
}
This will execute the code if the specified enemy has the tag "jumpingEnemy", the tags are divided by spaces. This will be useful to pack enemies, items, characters, projectiles etc. into stuff that then can be checked for other things. Like, killedByRays means that the enemy can be killed by rays in the level (for example), so each ray we can check for this tag to kill them.
EDIT - MORE:Also will be cool to have commands for tags also, so you can execute stuff over these objects with tags.
I'm making a game and I have two good examples on how I would use this thing.
There is an item called ice rain that converts all enemies into glitter balls, that explode with shrapnels upon contact. To make this, I should use a timeline that changes command by command each enemy into that ball, only those that are convertible, because there are some that I don't want to. But if I add a tag to all them like: "glitterable". We could do this
tag glitterable = enemy 11
//Enemy 11 is the glitter ball
Another example would be a menu with levels, that when you change the page all items that are buttons to go to the levels will be removed and the new items will be added.
But doing a timeline that removes all the possible items, or one that removes depending on the page you were is not much work and laggy?
A solution would be adding a tag called "levelMenuItems" to all them and using it to remove all them.
remove tag levelMenuItems
With this we achieve 2 main things:
- If planned correctly,
we save a lot of time because you don't need to put each item id with the commands, or each enemy id or whatever.
- As PB doesn't need to read a lot of commands,
we increase performance and the game is a lot better.
I forgot a third thing, lolThis would be a great addition to this:
https://theplatformbuilder.com/forums/index.php?topic=1281.0