How to slow down fire rate

tgunntgunn Member Posts: 19
edited May 2012 in Working with GS (Mac)
Hello my 8 year son Jesse is trying to make a game similar in nature to space invaders
but in this game he can't not figure out how to slow the rate fire if you hit the fire button fast you can fire a ton of bullets.

He would like to slow down the rate of fire or give a limited amount of bullets. The way he set it up was on motion he set velocity was on Y he put a value of 400 so the bullets float up he would like the bullets who faster too. I am not sure this is the proper way or not?

He has some money now from his birthday and he wants to get a developers license so he can publish them for iPad y kidsyand test them.
Can apply for a license at his age or do I have to do it?

What happen to selling lemonade? These crazy kids!

I should document his programming on video so cute...


Thanks

Tommy

Best Answer

  • tatiangtatiang Posts: 11,949
    edited May 2012 Accepted Answer
    You might find my tutorial videos helpful. They are designed for my students who are 8-13 years old. One of our first lessons is to customize the Alien Conquerors template. The videos are numbered from 1 to 18 and can be done in order to complete the game: http://tinyurl.com/gamesaladtutorials. Although this video isn't part of that playlist, it does address your question about limiting bullets:



    Also, an easier way to show us his rules is to post a screenshot, if possible, or a link to the game file.

Answers

  • CreeperWareCreeperWare Member Posts: 43
    edited May 2012
    That's really inspiring to hear kids being interested in this field from such an early age!

    I'll try to answer each question one at a time:
    1) If he is using a button to fire, you want to say that while that button is pressed , "bullet actors" will continue to be spawned.

    To limit how many are spawned, create an integer attribute (in game attributes) called something like "number of bullets" and every time a bullet is spawned have it increase that number by one.

    That way, you can tell the button to only spawn more bullets when "number of bullets" is less than the desired number.

    You can also use a timer around the "spawn bullet" bit of code to only spawn an acter every x seconds.

    2) He would only need a developer license from Apple, not a Gamesalad one. You can do this for him via the following link: https://developer.apple.com/devcenter/ios/index.action

    Best of luck to you and your son, have fun making games, and feel free to come back with any more questions you have!
  • tgunntgunn Member Posts: 19
    Thanks for responding! ok i am a little unclear i think i tried adding a timer for 3 sec but that did not slow the bullet down.. let me try this i will tell you how it is setup.



    gamesalad 08,7 (i am waiting on snow leopard to come so i can get the newer verion of snow lepoard so i can upgrade my game salad to new version.
    ----------------------
    player:
    ruless move left+right work fine player goes off scene but the re enters from opposite site.

    to fire actors receives event key space keyboard down

    play sound
    sound pow run to completion

    spawn actor
    actor g bullet layer order in front of actor.
    direction 0
    position 0 32 everything is relative to actor.


    attributes
    movable
    restitution 1
    --------------------
    bullet info

    rules
    bullet
    direction 90 relative to actor move type additive
    speed 600 shoots bullets faster now.
    timer
    after/every/for 3 seconds tried each one still gives rapid fire.
    destroy


    attributes:
    linear velocity Y 399
    movable
    ---------------------------------
    game attributes :

    number of bullets 1 integer
    ---------------------------------

    i tried the bellow it did not work at all for me, still rapid fire. or i enter the info in the wrong place. feel free to insert any values i should put in in the above setup. or is there a example template that would have this? that we can study?

    To limit how many are spawned, create an integer attribute (in game attributes) called something like "number of bullets" and every time a bullet is spawned have it increase that number by one.

    That way, you can tell the button to only spawn more bullets when "number of bullets" is less than the desired number.

    You can also use a timer around the "spawn bullet" bit of code to only spawn an acter every x seconds. i tried this still rapid fire..

    maybe looking what i posted will give the " a-ha!" moment and you can tell what need to be corrected or changed,


    soo much thanks!

    tommy
  • tgunntgunn Member Posts: 19
    gonna go check it out tonight once he is off the xbox... thanks for your input...

    Tommy
  • tgunntgunn Member Posts: 19
    great tutorials lots of good info to help start me off to explain to him how it it works.

    thanks all!
  • tgunntgunn Member Posts: 19
    one more question about fire button...

    our game has left and right movements.. for player
    and 3 fire buttons A B and C
    we know how to do A but what is the best way to add the other fire buttons so that "player"
    can shoot bullet A or B or C ? from the same player.

    our layer out is like this..

    A (button)

    B (button)

    C (button)
    <---left button {move} right button --->

    Thanks

    Tommy

  • jckmcgrawjckmcgraw Member Posts: 647
    @tgunn

    Just to clear things up... So you want be able to fire 3 difFerent types of bullets with buttons, A, B, and C?

    If so, you should copy actor A twice (holding down alt and dragging), and add attributes that trigger the firing.

    Sorry if that didn't make much sense. Could you post a download link to your project file?

    Regards,
    Jack McGraw
  • tgunntgunn Member Posts: 19
    here is the project file.
    jessegunn.com/project/rocknotebeta1.gameproj

    it does sound like it does not makes sense but in a way it does i kinda go your drift but project file is there..
    let go see if i understand your thought.
  • jckmcgrawjckmcgraw Member Posts: 647
    @tgunn

    I'll take a look at it tomorrow.
  • tgunntgunn Member Posts: 19
    ok it did not work what i thought about copying the spawning and changing spawning actor.
    take a look at project being getting some errors some times after saving i get missing images not found,,
    www.jessegunn.com/www/project/rocknotebeta.gameproj
  • tgunntgunn Member Posts: 19
    ok i think i solved it not sure if this is the best way but here is how i did it.

    i had setup bulletfired in game attributes
    so to fix my problem i made more game attribute

    bulletfire-a
    bulletfire-b
    bulletfire-c

    and just repointed the new fire buttons to the new attributes. and it worked!

    Tommy
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    @tgunn It sounds like you figured it out. By the way, if you post a link to a project file, be sure to compress it to a zip file first.
  • tgunntgunn Member Posts: 19
    thanks for the info!
  • dandetodandeto Member Posts: 23
    O>K,, For what your son is doing... I think it is great! and it is great you are invoked!! But, I am 13, and I have seen something probably better for his age...
    If your son is set on game salad, and wants to put it on apple, and you think it is o.k. then game salad is fine. but there is something called Scratch. it is kid oriented, but gave me enough to figure out when I was 11, so It might work for him better.
    he would probably understand what he is doing better, does he really understand velocity?

    anyway you can check that out, it is not online, no download, but he needs an account....
Sign In or Register to comment.