User Tag List

Results 1 to 8 of 8

Thread: getting into a vehicle?

  1. #1
    No Products Registered

    Join Date
    Oct 2009
    Location
    New Zealand
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    getting into a vehicle?

    hey guys, i was wondering how to get my character get in a car. i have made hime get in it before using (in my opinion) a complicated method and im sure there must be a simple way to do it. so if anyone could give me a step by step way to get in and out of cars that would be great. also my character is using eight directions as his movement.

  2. #2
    Clicker Fusion 2.5

    Join Date
    Dec 2009
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: getting into a vehicle?

    Probably the simplest way would be to draw a sprite of the character driving the car in 8 directions in your character's animations list. Make a separate sprite of the car parked.

    When character collides or overlaps with the car and you press a key to activate/use/open car door etc., then set character's position to the same position as the car, change his animation to driving and destroy the parked car.

    When he gets out of the car, create the parked car sprite at the character's current position and change his animation to walking.


  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5 DeveloperiOS Export ModuleMac Export ModuleSWF Export ModuleUnicode Add-on
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    JasonDarby's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    4,937
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Re: getting into a vehicle?

    Yes a seperate animation set for a car with no one in the vehicle is best.

    To get your character in the car to start with... hmm i guess this is kind of old GTA1 type? I would consider placing an invisible border around the car, and then checking when there is a collision between the walking person and the invisible border, when the player presses Enter (or another key), make the player character disappear, and change the animation of the car.

    You will need to center the invisible border on the car. This will mean that the player could drive the car, get out, and then get back in the car (as the border will still be in the correct position).

    As you will be scrolling, you would need to scroll the center of the frame based on the car, rather than the player...

    And dont forget you will need a flag, so that you can get out of the car when the player presses Enter a second time (Set the flag to 1 when in the car and 0 when not in a car).

    hope some of that makes sense

  4. #4
    No Products Registered

    Join Date
    Oct 2009
    Location
    New Zealand
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: getting into a vehicle?

    awesome ive got that to work, now how would i make it so when the car hits too many objects it blows up/stops working/etc and how would i make it have fuel?

  5. #5
    Clicker Multimedia Fusion 2

    Join Date
    Nov 2009
    Location
    center valley, PA
    Posts
    205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: getting into a vehicle?

    for fuel i would use a horizantal bar counter

  6. #6
    Clicker Fusion 2.5

    Join Date
    Dec 2009
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: getting into a vehicle?

    Use a counter or alterable value. Use it to count how many times the car hits an object (or group of objects).

    Or

    Use the counter as the car's 'health' and make it count down on impact. When it hits zero, blow the car up!

    For fuel, use a counter object and create something like this:

    Every 1 second+Car is moving or engine switched on --> subtract 1 from fuel.

    Make sure when you code your car's movement or engine start you include +Fuel Counter>0


  7. #7
    No Products Registered

    Join Date
    Oct 2009
    Location
    New Zealand
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: getting into a vehicle?

    How can i use multiple counters? im currently using: 1 score object (ammo), 1 counter object( money) and 1 health object (health)

  8. #8
    Clicker Fusion 2.5

    Join Date
    Dec 2009
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: getting into a vehicle?

    Just create a new counter object . You can use multiple counter objects as long as you name them differently.


Similar Threads

  1. How can I make Vehicle AI?
    By gordonquinton11 in forum The Games Factory 2 - Technical Support
    Replies: 2
    Last Post: 1st May 2012, 09:37 PM
  2. Creating a vehicle with Box 2D
    By CapJSheridan in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 21st July 2011, 09:46 PM
  3. Vehicle direction
    By pnekdo in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 26th September 2010, 06:24 PM
  4. Vehicle Physics?
    By Sebaceous in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 1st January 2010, 10:32 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
  •