Shooting rate Powerup

Discussion in 'Buildbox General Discussion' started by shesh, Apr 18, 2016.

  1. shesh

    shesh Avid Boxer

    Joined:
    Nov 15, 2015
    Messages:
    139
    Likes Received:
    32
    Hi guys,
    been trying to make a shooting-character to get a powerup which gives a faster shooting rate, however - the shooting rate is with the spawn-rate on the added spawner-component, and while it's possible to set a transform logic to effect the bullet object, it does not effecting the setting which are in the added spawn-component (and are effecting the shooting rate).
    any ideas?
     
    Last edited: Apr 19, 2016
  2. shesh

    shesh Avid Boxer

    Joined:
    Nov 15, 2015
    Messages:
    139
    Likes Received:
    32
    hmmm... someone?
     
  3. shesh

    shesh Avid Boxer

    Joined:
    Nov 15, 2015
    Messages:
    139
    Likes Received:
    32
    ...?
     
  4. shesh

    shesh Avid Boxer

    Joined:
    Nov 15, 2015
    Messages:
    139
    Likes Received:
    32
  5. Phill Mason

    Phill Mason Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    880
    Likes Received:
    721
    Hey @shlomyone, usually if no one has responded to you yet, it's often because, no one has tried what you're trying to do, they don't know, or it can't be done. I had a game with something similar to this, so I had a play around with it and you can do it.

    The trick is to create an action for your character to collect and inside that actions "Animation Action" you drag in an object and set it as a character bullet. As long as you set the duration of this action long enough, you will continue to use this new bullet you've collected and it will replace your characters main bullet.

    You can set the speed and spawn rate of each action (bullet) you collect to truly provide your game with various bullet/gun types - very cool.

    Bullet settings for inside the Action Animation:
    Preset: Character Bullet
    Object Type: Fixed

    Linear Velocity: This is where you'll set the speed of your bullet. 5 being slow and 95 being super fast.
    X = Landscape shooting.
    Y = Portrait shooting.

    Collision Type: No Collide
    Destroy Type: Destroy Enemy

    Spawner Settings:
    If you can leave this set to 1 and on permanent, the only part that will affect your bullet speed is the linear velocity.
    If you set this to 3 and Single Shooting, this will drastically change the rate at which you can fire (slower than 1).

    Playing around with these two settings, I was able to create 4 actions all with different bullet speeds. Have fun :)
     
    shesh likes this.
  6. shesh

    shesh Avid Boxer

    Joined:
    Nov 15, 2015
    Messages:
    139
    Likes Received:
    32
    Hi Phill,
    many thanks for the reply, much appreciated.
    Your solution works smoothly.:D

    just quick question: the new bullet does added, however, it keeps the previous bullet as well. how can it be replaced / clear previous bullet?
     
  7. Phill Mason

    Phill Mason Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    880
    Likes Received:
    721
    Start off your game with a small transparent bullet that has a smaller collision area than your usual first bullet and then collect your first action bullet right away at the beginning of your game.

    You probably haven't got the actions "Animation Behaviour" set to 'Replace'. Put a copy image of your character in here also, so throughout the duration of the action, you can see your character along with your new bullet.
     
  8. shesh

    shesh Avid Boxer

    Joined:
    Nov 15, 2015
    Messages:
    139
    Likes Received:
    32
    yep, I did set it on replace. the difference is that currently the bullet is a separate layer which linked to the character, just gonna do it as you've suggested - having the bullet as part of the character.

    it might turn out even better, as I was looking for a way that the character will start without shooting, and start only after few seconds.
     
    Phill Mason likes this.
  9. Phill Mason

    Phill Mason Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    880
    Likes Received:
    721
    Cool, good luck :)
     
  10. shesh

    shesh Avid Boxer

    Joined:
    Nov 15, 2015
    Messages:
    139
    Likes Received:
    32
    edit
     
    Last edited: Apr 21, 2016

Share This Page