Hi guys, I can't get my head around this and need some input from you.

0 favourites
  • 7 posts
From the Asset Store
Total customisation of the input! You can combine inputs from all peripherals. Make your game accessible for everyone!
  • I am making a Shmup, and I want to make this. (and it works)

    But I really want to make the shooting mechanism variable by using a loopindex, Like this way. (but it does not work)

    Any kind Wizard in here that can point me in the right direction? Thanks :)

    Tagged:

  • create variable shotRate

    then system action every shotRate seconds create bullet at whatever x,y

    Then you can change shot Rate variable to fire bullets at a slower or faster rate

  • Thanks :) But it is really not that simple. I want to be able to hold down CTRL and fire a volly of x amount projectiles, with x amount of time in between each shot, and then end with a little longer delay pause in the end before I can shoot again. But it is important I kan keep CTRL down for continuous shooting.

    I have tried many times now in all manner of ways, but I just can't get it right.

    (English is not my main language, bear over me) ;)

  • Try using the Timer behaviour. When the ctrl key is down and the timer is not running, launch the volley and start the timer to whatever delay you'd like. Once it's done, using the ctrl key would launch the volley again.

  • I have tried serval attempts on doing that.

    But, I think I have to skip the loopindex part, it is the key reason all this is not working.

  • It works fine. Your logic is just getting tangled. You should separate out what you are trying to do, dont tie the bullet creation loop to your state change/cooldown.

    For example

    | Global number burst‎ = 5
    + Touch: On any touch start
    + System: Repeat burst times
    -> System: Wait LoopIndex×0.1 seconds
    -> Player: Spawn Bullet on layer 0 (image point 0) (create hierarchy: False)
    

    Works perfectly fine.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ha, thanks mate! :)

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