How do I put a powerup like fireflower?

0 favourites
From the Asset Store
100 high-quality footsteps sounds specially crafted to help you put sound to your games
  • Hello everyone! I need your help for put a powerup like the fire flower item of Mario Series. I did a gun sprite and that is the powerup. But i need that when my character takes the gun, becomes into a alternative sprite thas is the same character with diferent suit (i did the sprites of that too). Because it is supposed that when he grabs the gun becomes into a cowboy.

    Also, i don't know how to shoot when grabs the powerup.

    Sorry for my bad English and thank you so much ^^

  • One way you can do it is to have a variable which changes when the player picks up a powerup and which controls which weapon/animations are played.

    So e.g.

    Player collision with Powerup --> Destroy Powerup + Set Variable to 1

    If Player shoots + Variable = 1 --> Shoot flamethrower

    If Player running + Variable = 1 --> Set animation to Cowboy_Running

    etc.

  • Thank you! But I don't know if I did it bad or something beacuse the charactear starts to appear and disappear and bugs.

    Maybe the PlayerBox is being the issue?

    Ok. The problem was the origin point. But know the animation doesn't run. Only changes the animation,

    Please, I need your help!

    Other problem is when I tried to slide (because my character has the ability to slide) with the varible set to 1 doesn't change the animation, unless I press the button several times

  • I mean, if you haven't already, you need to add the conditions for every time you switch animation, for every value of variable. Something like,

    If Player walking

    (sub event) + Variable = 0 --> Change animation to Normal_Walking

    (sub event) + Variable = 1 --> Change animation to Cowboy_Walking

    If Player presses slide --> Slide

    (sub event) + Variable = 0 --> Change animation to Normal_Slide

    (sub event) + Variable = 0 --> Change animation to Cowboy_Slide

    Otherwise you may get conflicts with it trying to switch to a different animation when it's trying to slide, etc.

  • I already did, the problem is when I walk in the cowboy animation doesn't "run" the animation. It puts the animation but no run. Other problem I get is when I try to shoot. I did two animations for the cowboy, one is normal with Iddle, run and jump animation. The other is when I press the key to shoot, and the sprite is the cowboy shooting. The point is that when I press the shoot key the animation of cowboy shooting doesn't appear.

    I hope you can help me and apologize for any inconvenience ^^'

  • Hmm, a little hard to say without looking at the capx. Are the controls for movement/shooting separated from the animation changes with sub events? It sounds like it might be a conflict where movement controls only apply if the cowboy animation isn't playing, or shooting automatically plays the not-cowboy animation. Can you post a screenshot of the events in question, or upload your .capx to download?

  • Also I can not explain very well in English u.u Here is the project mega.nz ... F2lhmCy-CE

  • Sorry, here is mega.nz ... F2lhmCy-CE

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • lol try breaking the link up into several lines, this forum doesn't allow newer members to post links unfortunately

  • mega nz / #!slQTWJTT!WoTLrsPjSmd5gI5zwu7CmhgbN7UqSejPUF2lhmCy-CE I hope that this works xD

  • That worked! But now I'm confused... the player has no animations other than his normal type and I can't seem to find the powerup or any events related to it..?

  • Oh sorry I did not up the capx upgraded xD Now I send it

  • Here is the link updated mega nz/ #!Zg5DHLaA!nWy4QJPwjuZH_MJulRoOSVN-jRFVBuVljT_XLbTPJx8

  • Please, prefer using the "Edit" button in the top right corner of your posts then multi posting in a row.

    I've gathered some of your post in a single one on the first page.

    Bumping is only allowed after 24 hours in these forums.

    As for your project, you need to learn to use sub-events in order to make several conditions depending on top level events.

    You are pretty much confronted to the finite state machine.

    Do search this term in the forum search and you'll find working examples.

    Also do check the How do I FAQ for the "animations" category for further examples of handling.

  • Sorry, I did not understand very well your explanation of what I have to do :S

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)