Collect Auto Shoot

Discussion in 'How Can I...?' started by rmmssn, Apr 13, 2017.

  1. rmmssn

    rmmssn Boxer

    Joined:
    Mar 29, 2017
    Messages:
    3
    Likes Received:
    0
    Hey guys,

    I'm new to Buildbox and I've been reading and watching different tutorials in the last couple of days, but there is one thing that I still can't get right.
    Might sound pretty basic, but I'm looking for a way to trigger an auto-shooting animation that lasts for 5 seconds after the player collects a specific item on the scene.
    I started working with the avoidance preset and I've tried to either add my bullet object within my character shooting animation or as a linked object directly on the seen. I tried to play with the power-ups Buildbox capabilities and also with the spawn and wake up settings but there is obviously something I'm doing wrong here.

    Any piece of information that could help me look into the right direction would be great.

    Thanks!
     
  2. rmmssn

    rmmssn Boxer

    Joined:
    Mar 29, 2017
    Messages:
    3
    Likes Received:
    0
    Is it possible to activate/deactivate a UI button?
    I can't find any solution to my problem so I'm considering displaying/hiding a shooting button.
    Would that work? (except from the fact that the user will have to keep touching the screen...)
     
  3. rmmssn

    rmmssn Boxer

    Joined:
    Mar 29, 2017
    Messages:
    3
    Likes Received:
    0
    Okay, I've just found the solution to achieve this:
    - drop a graphic as an action (this is the item you need to collect in order to auto-shoot for a specific amount of time)
    - select that action from the asset bar on the left and set the action type to strike
    - edit the action animation by adding the bullet, select the bullet on the canvas to set the linear velocity, collision type (no collide) destroy type (destroy enemy) and add a spawner to your bullet with a spawn action set as permanent.
    - after closing the animation editor, make sure that the animation placement is set to character and overlay.
    - finally, on the properties section, set the duration and the appearance chance and you're good to go.

    Hope it helps.
     

Share This Page