how to make a actor go strait forward?

i want to spawn a actor and it go strait. no there or there just strait till its off the scene. even if my player is moving.

Comments

  • pHghostpHghost London, UKMember Posts: 2,342
    edited November 2014

    @SkyDivingGames said:
    no there or there just strait till its off the scene

    Well, definitely not there or there! Those are off bounds!

    But the question remains:

    Straight where? Straight left, or straight right? Straight up, straight down? Straight at the player/screen?

    You'll have to describe what you want a little better.


    And welcome to the Forums!

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited November 2014

    Hello, @SkyDivingGames

    There are different ways of moving an actor - spawned or not.

    If you're not worried about collision not working, then add into your Prototype actor in the library (the one to be spawned):

    Interpolate self.Actor.Position.X to ---an x coordinate just outside your screen
    Time: however fast you want it to go

    If collision is relevant, use the Move To behaviour, or change the velocity to more than 0, or the Move behaviour with a Destroy behaviour when it reaches a point outside of your screen.

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

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited November 2014

    Please read through the FAQs, especially the first section on Cookbook links: http://forums.gamesalad.com/discussion/66768/forum-faq#latest.

    Once you familiarize yourself with GameSalad, you'll have a better idea how it works. There are also countless videos that will help you get started (e.g. Google GameSalad movement.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • SkyDivingGamesSkyDivingGames Member Posts: 2

    strait up. kinda like space invaders when you fire.

  • pHghostpHghost London, UKMember Posts: 2,342

    @gyroscope said:

    Interpolate self.Actor.Position.X to an X coordinate just outside your screen
    Time: however fast you want it to go

    If collision is relevant, use the Move To behaviour, or change the velocity to more than 0, or the Move behaviour with a Destroy behaviour when it reaches a point outside of your screen.

    As, @gyroscope‌ writes. In the case of up, you'll want to work with the Y coordinates instead of X.

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited November 2014

    @SkyDivingGames said:
    strait up. kinda like space invaders when you fire.

    As has been said, read through the Cookbook, as well as the Manual - because what you're asking is very basic which you could learn easily first.

    Straight up is moving in the y direction - choose any one of my suggestions but changing the x coordinate for the Y one.

    Edit: @pHghost beat me to that one... :smile:

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

  • SkyDivingGamesSkyDivingGames Member Posts: 2

    Ok, thank for the help.

  • SocksSocks London, UK.Member Posts: 12,822

    @SkyDivingGames said:
    strait up. kinda like space invaders when you fire.

    That, right there, is a T-shirt.

    :smile:

  • SocksSocks London, UK.Member Posts: 12,822

    @SkyDivingGames said:
    Ok, thank for the help.

    Here's a very basic demo project - just two actors.

    Use the left and right keys to move, use the space bar to fire (spawn an actor that moves up).

    Link: https://www.mediafire.com/?il4csgrmyc5nsrd

    . . .

Sign In or Register to comment.