Help with motobike game

first i was wondering how you would go about doing this
"i want to jump off a ramp on my motobike (that be i know how to do the bit im stuck with is knowing how far i went and having it show up in meters how far my jump was ?

Comments

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Hey man - I'd really recommend watching ALL of the video tutorials available before even thinking of starting a game like that. Especially since you joined just a few days ago. We have tons of free vids over at GSHelper. You could also check the GameSaladCookBook on YouTube.
  • JordeyyJordeyy Member Posts: 409
    @Braydon_SFX i have purchased moto x template off DBA so ive got the foundation allready
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited February 2013
    In your bike actor:

    Change attribute game.StartX to self.Position.X [put this at the top of the rules list]

    When [condition for end of jump, e.g. finish line, crash, hit the ground]
    .....Change attribute game.EndX to self.Position.X
    .....Change attribute game.Distance to game.EndX-game.StartX

    You can then use math functions to adjust game.Distance to the unit you want (e.g. meters). For example, if the farthest possible jump is a difference of 300 pixels but you want that to be recorded as 100 meters, you would do:

    Change attribute game.Distance to (game.EndX-game.StartX)/3

    And then to display the meters:

    DisplayText [floor(game.Distance).." meters"]

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

  • JordeyyJordeyy Member Posts: 409
    @tatiang could you make me a quick demo/template please cause im confused lol
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    @Jordeyy You say you have the foundation because you bought a template but having a template does not mean you know how the template works. The rules I posted above are pretty basic in terms of how they work. You may need to study the cookbook or other tutorials as @Braydon_SFX suggested so that you're familiar with the basics.

    Anyway, for what it's worth, here's a demo:

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

  • JordeyyJordeyy Member Posts: 409
    @tatiang i am getting round to looking at as much tutorials as i can bro and i realy apriciate the demo :)
  • JordeyyJordeyy Member Posts: 409
    @tatiang when i do what you said it crashes my game and says one of the scripts on my page appear to a have a problem
  • JordeyyJordeyy Member Posts: 409
    @tatiang ive fixed that now but now my issue is that it starts at 70 and then dont change
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Well, it sounds like you didn't add the rules correctly. Check for spelling/syntax errors. If you can't get it to work, post a screenshot of your rules. You can upload a screenshot to a file sharing service and then use <$img src="URL"> (without the $ symbol) to post it.

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

Sign In or Register to comment.