User Tag List

Results 1 to 4 of 4

Thread: Issue with shooting in platform game!

  1. #1
    No Products Registered

    Join Date
    Dec 2008
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Issue with shooting in platform game!

    Like the title implies, with my platform style characters, whenever I attempt to shoot while in midair, the bullets always drop straight down or occasionally up.


    I have it set to: "Whenever 'Z' is pressed, shoot bullet at speed 75". Always looking in the direction of the character.

    I assume its because when the character falls or jumps, the direction changes to suit. (i.e. falling=down, jumping=up)


    Does anyone have any ideas of how I could keep the direction of the bullets purely forward and back? Or something I could change to make the issue easier on me?

  2. #2
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Issue with shooting in platform game!

    Your guess as to the cause is right - when a character's moving more up/down than left/right, its movement is counted as those directions and not the direction that your character appears to face.

    What I do to get around this is use a separate object, called "Facer" or something similar, that has only two animation directions - left and right - and is kept off the edge of the screen. I set up two events to make it face left when Left is pressed, right when Right is pressed, and then use its direction to choose the direction to shoot the player's bullets - click the "Use a calculation" button on the "Shoot in selected direction" option of the Shoot an Object dialog, and enter Dir("Facer").

  3. #3
    No Products Registered

    Join Date
    Jun 2007
    Posts
    323
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Issue with shooting in platform game!

    Or you could use values. I just make a "direction" value for my player that is shooting.

    User presses right- Set value to 1
    User presses left - Set value to 2

    Value is 1- Set direction to right
    Value is 2- Set direction to left

    And instead of shooting in direction of player, you could also use

    If value is 1 and user shoots - Shoot bullet at 0
    If value is 2 and user shoots - Shoot bullet at 16

  4. #4
    No Products Registered

    Join Date
    Dec 2008
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Issue with shooting in platform game!

    Sweet! Thanks for the idea.
    That's pretty clever, wish I had thought of it. =P

    Anywho, I'll be sure to try it. I'll let you know how it goes.

    EDIT: Heck yeah. All things looking good. Thanks for the quick replies you two.

Similar Threads

  1. issue with dublicate projectile with 360 degree side shooting game, please help
    By MTFNoobik in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 22nd July 2012, 11:03 AM
  2. Shooting issue
    By Sealboyno1 in forum The Games Factory 2 - Technical Support
    Replies: 21
    Last Post: 15th June 2011, 02:02 PM
  3. Upload shooting issue
    By FlinkGigitty in forum File Archive
    Replies: 1
    Last Post: 23rd February 2010, 08:52 PM
  4. Platform and shooting
    By Rabagast in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 8th December 2009, 08:41 PM
  5. Shooting Direction Issue
    By AgentJackSeven in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 18th June 2009, 01:21 AM

Posting Permissions

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