Spawn actor based on mouse movement?

ChirpinGamesChirpinGames Member, PRO Posts: 214
edited November -1 in Working with GS (Mac)
Hey guys,
Just wondering if anyone knows a way to spawn an actor based on mouse movement? So if the mouse is relatively still it will only spawn an actor say once a second but if you make a sudden quick movement it would spawn a whole heap as you drag along...
Thanks in advance,
Mark

Comments

  • UtopianGamesUtopianGames Member Posts: 5,692
    I would advise against doing this...spawning a lot of actors will give you slow down.

    Another little tip...don't spawn an actor that spawns another actor this will make you game judder/lag too.

    Darren.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Sound advice from Darren but if you still did want to go ahead, it'd not be possible to spawn actors based on a mouse's speed anyway. I pretty much certain that there is no way of getting that information, i.e speed of drag (whether it be mouse or touch). You could still spawn at regular intervals though, every second say, up to a maximum amount just before significant slow-down. What that amount would be would depend on your spawned actor's file size, as well as what device you'd be running the game on, as I'm sure you know.

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • MotherHooseMotherHoose Member Posts: 2,456
    @ChirpinGames

    if your spawns are just visual effects....

    ===

    Particles - Are purely visual. This is not the same as a Spawn Actor behavior. The particles that are produced are only for show, and cannot be programmed. You can choose an image to make the particles out of but it can't be animated.

    http://gamesalad.com/wiki/behaviors_reference:particles

    ===

    yuck the search is broke... but WesWog had a lovely video tutorial
    I don't know if you could confine the particle generation in a drag behavior that responds to the user input... you could work on this for us!

    MH
  • MotherHooseMotherHoose Member Posts: 2,456
    found weswog's video

    How-To Create Cool Particle Effects in Gamesalad

    hope this helps

    MH
  • ChirpinGamesChirpinGames Member, PRO Posts: 214
    Great! Solid advice guys.... thanks. @MotherHoose i think i'll give that a shot it just may be what i'm after :) I didnt even think about particles!

    Cheers,
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Good advice from everybody. but if you must spawn a actor based on mouse position you can. In you spawn enemy behavior for the position you click on the expression editer and go to devices mouse position x, then do same for y
Sign In or Register to comment.