User Tag List

Results 1 to 10 of 10

Thread: Gravity

  1. #1
    No Products Registered

    Join Date
    May 2007
    Location
    Christopia
    Posts
    259
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Gravity

    How would i add gravity to actives and an active with an eight directions movement?

  2. #2
    Clicker Multimedia Fusion 2Android Export Module
    Corlen's Avatar
    Join Date
    Mar 2007
    Location
    Your House
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Gravity

    I learned this one a while ago from the Magician's Lair example game included with TGF. You'll need a second object which is the actual moving object which is always invisible unless it's a shadow. Object 1 can be your player's sprite and object 2 can be the moving object.

    If Always
    Set X position of object 1 to object 2.
    Set Y position of object 1 to (Y of object 2-(Value Y of object 2 / 2))-40

    If jump button pressed
    If jump flag is off
    Set on jump flag
    Set value Z to -10(or whatever you want) of object 1
    ^ The lower the value the higher the jump will be.

    If jump flag is on
    Subtract value Z from value Y of object 1
    Add 1 to value Z of object 1

    If Y position of object 1 is greater than Y position of object 2 - 31
    Set value Y of object 1 to 0
    Set value Z of object 1 to 0
    Set off jump flag

  3. #3
    No Products Registered

    Join Date
    May 2007
    Location
    Christopia
    Posts
    259
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Gravity

    Would you mind making an example of this? That would help alot

  4. #4
    No Products Registered

    Join Date
    May 2007
    Location
    Christopia
    Posts
    259
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Gravity

    Also whenever i try to do the y position of object 1 i get a Mixed String and Numbers error

  5. #5
    No Products Registered

    Join Date
    May 2007
    Location
    Christopia
    Posts
    259
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Gravity

    Nevermind I found out the problem

  6. #6
    No Products Registered

    Join Date
    May 2007
    Location
    Christopia
    Posts
    259
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Gravity

    heres what i made following that above but it doesn't work. Could someone fix it and post it here?

    http://www.speedyshare.com/434924726.html

  7. #7
    Clicker Multimedia Fusion 2Android Export Module
    Corlen's Avatar
    Join Date
    Mar 2007
    Location
    Your House
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Gravity

    One sec and I'll fix it and post it in the file archive section.

    Here's the fixed file. http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=58522#Post58522

  8. #8
    No Products Registered

    Join Date
    May 2007
    Location
    Christopia
    Posts
    259
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Gravity

    This is good thanks a lot. But i also want it to be so that you're on the ground and you can jump onto different objects. Something kind of like the original Mario games. Where your on the ground and you can jump onto those block things.

  9. #9
    Clicker Multimedia Fusion 2Android Export Module
    Corlen's Avatar
    Join Date
    Mar 2007
    Location
    Your House
    Posts
    848
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Gravity

    There was an example somewhere someone else made to achieve this but it'll take a lot of work and I don't know if that engine there will be compatible.. I can't remember where it's at..

  10. #10
    No Products Registered

    Join Date
    May 2007
    Location
    Christopia
    Posts
    259
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Gravity

    Ok if you find it post it here and thanks for your help.

Similar Threads

  1. Box gravity
    By gkinfinity in forum Multimedia Fusion 2 - Technical Support
    Replies: 14
    Last Post: 18th November 2013, 07:19 PM
  2. Gravity
    By danjo in forum Fusion 2.5
    Replies: 5
    Last Post: 18th October 2013, 07:14 AM
  3. Gravity
    By Degamer in forum The Games Factory 2 - Technical Support
    Replies: 7
    Last Post: 12th July 2010, 07:11 PM
  4. New Gravity
    By Guitaristinmakin in forum File Archive
    Replies: 7
    Last Post: 16th December 2007, 04:24 PM
  5. gravity
    By Taco in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 18th September 2007, 08:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •