User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: A few weapon problems!

  1. #1
    No Products Registered

    Join Date
    Jul 2009
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    A few weapon problems!

    Hello, guys!
    I have a few "weapon problems" in my game (top-down shooter):
    - The first of them is about fire rate and animation.
    I have made "shooting" animation for sub-machinegun and as it (the gun) has high fire rate (every 0,12 second), after 9-10 seconds of shooting animation ceases to play.((( I tried to increase the animation speed of the gun, but it seems like is not enough for needed result.( Explain me please what is wrong?
    - The second problem is in bullet penetration. My game uses realistic weapon system: bullets fly with 3000-5000 points of speed (vector movement) and often go through objects(walls and barrels for example). How can I fix this problem if not to draw the bullets longer and not to decrease bullets speed?
    Thanks in advance! Sorry for mistakes!xD))

  2. #2
    No Products Registered

    Join Date
    Mar 2007
    Location
    Sydney, Australia
    Posts
    1,369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: A few weapon problems!

    For number 1 its hard to tell without looking at your mfa file.
    Number 2 is a problem that the bullet simply do not hit your obstacles. This is because you move the bullet so many pixels per second that it can easily jump over small obstacles. You need to start a fastloop that moves the bullet in little steps and checks for collisions each step. That way you can still move your bullet as fast as you are now but you are effectively breaking it down into smaller chunks.

  3. #3
    No Products Registered

    Join Date
    Jul 2009
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: A few weapon problems!

    Quote Originally Posted by bigredron
    That way you can still move your bullet as fast as you are now but you are effectively breaking it down into smaller chunks.
    Why do I need break it down into smaller chunks? Could you explain what do you mean, please?

  4. #4
    Clicker Fusion 2.5

    Join Date
    Mar 2007
    Posts
    495
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: A few weapon problems!

    About problem number one -
    I think if you add into your event that sets the animation to Shooting "+ Animation Shooting is not playing" it'll stop the object from trying to play an animation that is already underway. That's what's jammed animations in the past for me.

    You have to "add new condition", Test the object for "Is animation playing" and then right click on it to negate it (ie. "Is animation NOT playing").

  5. #5
    No Products Registered

    Join Date
    Jul 2009
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: A few weapon problems!

    OK! Thanks!
    I have fixed the problem number one and now I am working on fast-loops based bulet movement in event editor.
    I need to calculate number of X-value and X-value depending of bullet's angle to change x and y bullet postion on loop by that values. I have made moving algorithm, but it doesn't seems to work correctly, because bullet doesn't hit the center of crosshair.((( More than that, algorythm changes direction and speed of all bullets the same time instead of each other separately!
    You may test my work http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=156923&#Post156 923



  6. #6
    No Products Registered

    Join Date
    Mar 2007
    Location
    Sydney, Australia
    Posts
    1,369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: A few weapon problems!

    What you need to do is assign an alterable values to your bullets. Lets call this "ID"

    + Always
    - Spread value 0 in "ID" of bullet

    + Always
    - Start loop "bullets" number of bullets times - IMPORTANT: keep this on a seperate event to the spread value!

    + OnLoop "bullets"
    + "ID" of bullet = Loopindex("bullets")
    - Start loop "move" number of steps times (you need to define this based on how far you are moving each frame)

    + OnLoop "move"
    + "ID" of bullet = Loopindex("bullets") - we are keeping this condition so we can keep the right bullet object selected
    - move bullet in your desired direction/distance per loop
    - check for collisions etc


    First this we are doing is giving each bullet a unique ID begining from value 0 (so bullet 1 gets an ID of 0, bullet2 gets an ID of 1 etc)
    You then loop through each bullet object by calling the bullet loop and selecting only the bullet which has a matching ID to the loop step.
    So now we ahve selected the right bullet we need to move it so we start a second loop inside the bullet loop (this is called a nested loop) which moves the bullet as you need to.
    The advantage of doing this is that it still appears instant to the user as loops happen very quickly, but you can test for collisions at each step along the path meaning you can prevent bullets from skipping over small obtacles.

    Hope this makes sense. There are probably other ways to do it but this would be the way I would tackle it.

  7. #7
    No Products Registered

    Join Date
    Jul 2009
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: A few weapon problems!

    ok, thanks a lot, bigredron, for your help with fixing "ID problem", but I also interested in formule i have debelopted. I think the formula is a little goes wrong, but i Don't know where i've made mistake. maybe somebody knows the formula?
    p.s. This formula seems to be used in "vector movement" for calculating vector and speed)...

  8. #8
    No Products Registered

    Join Date
    Mar 2007
    Location
    Sydney, Australia
    Posts
    1,369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: A few weapon problems!

    Im not familiar with vector movement really, but what is the formula you are using? Maybe someone can help you out.

  9. #9
    No Products Registered

    Join Date
    Jul 2009
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: A few weapon problems!

    I have fixed all the issues i had!
    I really had no idea what formula i need for making my "pixel-perfect" bullet system, but I guessed it may be a nested loop . Seems like I know loops not as well as i thought.
    Thank you, bigredron!

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

    Re: A few weapon problems!

    www.create-games.com

    In the article section, there is an article for pixel perfect (better than 360) bullet system.
    Working as fast as I can on Fusion 3

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Weapon use tutorial or example?
    By gamer123 in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 16th June 2012, 10:38 AM
  2. A Sling weapon
    By Tiger in forum The Games Factory 2 - Technical Support
    Replies: 1
    Last Post: 1st May 2012, 11:44 AM
  3. Character Weapon Switching on the fly? {With PMO}
    By darkmanx_429 in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 16th April 2012, 02:30 AM
  4. Help with setting angle to weapon!
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 11th February 2011, 08:39 AM
  5. Weapon/armor sprites
    By Martin in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 2nd March 2008, 03:07 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
  •