How to create power-ups? Come and learn!

I hope it helped you.
silinecek

What is this doing? Destroying the player, and spawning a new player with different properties, and giving an alert pop up? This isn’t entirely necessary at all.

Let’s say you just want to make a PacMan game. Have him touch a power pellet, then have it turn off an on/off switch where collision with a ghost kills you, and let a timer turn it back on. Have it send a message to the ghosts to play the blue animation, and turn on an on off switch, so they can be killed, until the timer turns it off.

There is never any reason to spawn a separate entity for a simple powerup, because then you have to reprogram a character, and all enemies that react to that character, since proximity and other traits only work for non-emitted entities, or certain object numbers, depending on your settings.

Even when you die, you should never really emit a new player. You should message your life counter, and snap the player back to the last save spot they were in, by having each save point send a message to the player, it’s extracted xy position, so the player can die, and set it’s position to the save spot, instead of emitting a new player. You can also do the PacMan trait, and turn off your collision death, for an immunity timer when you respawn.

Tl;dr emitting a new player type isn’t nearly as effective as just using switches to change player traits.

OK but is mine works? It works. And your tactic is more harder than mine tactic.

Yes, you can do this with switches too but it will be too hard for begginers. When I look flowlab’s official forum, I want to see more easier “how to fotographs”. If I will do this with switches, it will be more harder for begginers.

Your way is very inefficient. It would be like climbing over a house, instead of walking around it, since going in a straight line seems better on paper. If someone has 15 behaviors on their player, and enemies that follow the player, when you emit a new type, they will have to remake the new player, and enemies won’t follow it. It’s better to not use emit for anything except projectile weaponry, or enemy spawning.

I’m going to make a video tutorial of this.
Read my comment:
http://forum.flowlab.io/discussion/comment/8526/#Comment_8526

i have to agree with Mhx Ar. destroying the player and emitting another would mean recreating many behaviors as well as with some other enemies. it also wastes objects in free version.

Just use switches and everything is okay

yeah, its not that complicated once you figure it out. its actually really easy

Ok if you want with switches I can do this with switches too I edited the photograph

@Luminous700 @Mhx Ar" ?

That works. If you want to make it like Mario, you can turn off the collision to die, and have the collision with an enemy turn off the powerup, and turn back on the ability to die, so you can get hit twice.

@olcayolcayolcay nice :]