User Tag List

Results 1 to 9 of 9

Thread: Mercs Remake weapons help

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    Feb 2007
    Location
    UK
    Posts
    209
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Mercs Remake weapons help

    Hi, I am remaking one of my best games and made three of the four weapons in the game.

    I am having trouble with the flame gun, does anyone no how I could emulate this weapon? Here is a video of what it looks like and what it does
    Mercs Flame Gun

    I you would like to see the other guns I have made, they are here.
    Rifle & Erifle
    Rocket Launcher and interchanging between weapons

    Thank you for any help.

  2. #2
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Mercs Remake weapons help

    Looks pretty simple, actually. I don't mean easy, but it's simple to do. I'll make an example later, right now I am making one for somone else.
    Working as fast as I can on Fusion 3

  3. #3
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    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)

    Join Date
    Jun 2006
    Location
    Killeen, TEXAS
    Posts
    1,037
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Mercs Remake weapons help

    thats ones not hard to do, as LB said. top of my head, i could think of a few different ways to do it.
    maybe the simplest way would be just make the 8 or 9 parts.
    position each part according to an angle (you face)
    when you rotate, change the angle of the closet always to the angle you are facing.
    you could put a small delay and compare the angles of the next part to its previous, and then change its angle up or down. that way you'll get that "swishing" effect.
    each part could store its angle internally - ie altA so you can keep track of where each part is.
    so when you do the compare
    eg:
    angle part#2 < angle part#1 - sub angle part#2 by 1.
    angle part#3 < angle part#2 - sub angle part#3 by 1.
    etc.
    you could then position them all according to their angle (in alt A)

    for the flame to stay out and retract, id have a counter that has min 0, max 10. for eg.
    repeat while fire is press, + every 0.04" add to it.
    then you could do a check to see if the corresponding flame is present;
    ie:

    counter = 1
    + number flame#1=0 -> create flame#1: position x to pplayer(x)+sin(angle)*8, position y to player(y)+cos(angle)*8

    counter = 2
    + number flame#2=0 -> create flame#2: position x to pplayer(x)+sin(angle)*16, position y to player(y)+cos(angle)*16

    etc.

    for release:
    [negate] repeat while fire pressed
    + every 0.04" -> sub counter

    counter <=7
    + number flame#8 >0 -> destroy flame#8
    counter <=6
    + number flame#7 >0 -> destroy flame#7
    etc.

    its a bit long winded, but would work no probs.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    Feb 2007
    Location
    UK
    Posts
    209
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Mercs Remake weapons help

    Danjo - That all looks a little complicated to me danjo I will try to work it out in the mean time with your example thanks buddy.

    LB - If you can make an example dude that would be better for me as I will have something to work off.

    Thanks for the help.

  5. #5
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    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)

    Join Date
    Jun 2006
    Location
    Killeen, TEXAS
    Posts
    1,037
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Mercs Remake weapons help

    heres what i was talking about here:
    View MFA

    1 problem - and its gettin late and im off to bed, but someone might want to fix the compare past zero thing
    eg:
    the angle may be 5, and the next angle may be 355 (angle 5 is actually meant to be less than)

  6. #6
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    Ryan's Avatar
    Join Date
    Nov 2008
    Location
    Australia
    Posts
    1,275
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Mercs Remake weapons help

    I've battled with the 'past zero' problem. Here's a good article explaining how to fix it 'mathematically'.

    And here's an example of the fix in MMF2 language. Download the file from the bottom reply, as the first file has a bug in it.

    Hope this helps danjo.

  7. #7
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    Ryan's Avatar
    Join Date
    Nov 2008
    Location
    Australia
    Posts
    1,275
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Mercs Remake weapons help

    I think the easiest solution is to:

    repeat while player presses shoot
    - shoot an object in the direction of the player

    Make that object have a 'disappearing' animation (eg. use an explosion animation from the library).

    It will appear exactly as in the example, and it will have a delay when rotating because the objects closer to you will rotate first (as they spawn), then it will delay as they get further out.

    The reason they look evenly spaced I believe is that they're shooting at such a high speed that they are literally moving 32 pixels or so per frame. Then all it takes is 9 frames of 'disappearing' animation to make them destroy at the end of the flame.

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    Feb 2007
    Location
    UK
    Posts
    209
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Mercs Remake weapons help

    thanks for this, yea hehe I see what you mean by the bug. I will try to get around it.

    Ryan, I really get what you mean here, thats sounds like an easy way to do this. But if all else fails I have a back up plan. It won't be like the original flame gun but will be still fun to use.

    Thanks for the help guys, really friendly helpful forum.

  9. #9
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    Feb 2007
    Location
    UK
    Posts
    209
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Mercs Remake weapons help

    Got the Flame Gun to work now, it kinda acts like the arcade version of the original game which is kinda cool. Don't think anyone playing would mind.

    I used Ryan's notes to help develop this, thanks buddy and thanks to all that have help with this matter.

    Heres some progress of the flame gun: Flame Gun

    More Progress with Flame Gun level up: Flame Gun Level Up

    Kreeddem.

Similar Threads

  1. Bad Example of Switching Weapons
    By variant in forum File Archive
    Replies: 0
    Last Post: 26th January 2010, 02:16 AM
  2. How do I randomly spawn weapons?
    By Caesar in forum Lacewing
    Replies: 4
    Last Post: 10th April 2009, 09:36 PM
  3. Cycling through weapons?
    By JoshHarris in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 8th January 2008, 07:03 PM
  4. how to: changeable weapons etc.
    By Dariorox in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 7th November 2006, 11:33 PM
  5. How to deal with different weapons
    By Pancra in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 20th October 2006, 08:49 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
  •