User Tag List

Results 1 to 4 of 4

Thread: best way to equip a gun from set of available guns

  1. #1
    No Products Registered

    Join Date
    Apr 2008
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    best way to equip a gun from set of available guns

    so for my game i want to the character equip a primary gun and a secondary gun at the same time. right now i just have one of each in my game. i'm looking for a good way to start adding more guns (of both gun classes) and have a way for the player to choose what gun to equip in each slot.

    each gun will have different bullet spray patterns and/or shoot different bullet types as well as having a different sprite.

    can i do this with ini files? how would i organize each weapon in the event editor?

    and also, how could i make certain weapons only available after the player has unlocked them?

    could i do some of this with ini files?

    and a somewhat unrelated question -- is there a way to check for a collision with like.. a class? i have many types of enemies (and bullets) and among other things i want to destroy a bullet if it hits any enemy. right now i have similar lines of script for each enemy and bullet collision and it seems very redundant and tedious to make changes to. can i basically tag all enemies as 'class-enemy' and all bullets as 'class-bullet' and then check for a collision between 'class-enemy' and 'class-bullet' to run code?

    thanks!

  2. #2
    No Products Registered

    Join Date
    May 2008
    Location
    California
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: best way to equip a gun from set of available guns

    You can add a qualifier to each of the enemies and in the event editor use the qualifier instead of the active when making events.
    It's basically a class.

  3. #3
    No Products Registered

    Join Date
    Apr 2008
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: best way to equip a gun from set of available guns

    got qualifiers working fine thanks

    i'll start messing with the gun stuff tomorrow. dictating what slot the weapon goes in with an ini file seems simple enough. same goes for the unavailable value.

    still unsure about actually calling different weapon behaviors based on what is equipped. but i'll look at it more tomorrow.

    thanks for the tips so far

  4. #4
    No Products Registered

    Join Date
    Apr 2008
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: best way to equip a gun from set of available guns

    got most of it working. there was an issue i ran into though. i got around it by just toggling visibility instead of creating/destroying, but in case that isn't an option i'd like to know if there's a way to do this for future reference:

    i have a pause screen (sub app) with the weapon selection menu (buttons that change the ini value of what weapon is equipped). is there a way to create a one-time event condition for when that sub app is closed and you return to the main frame? so that when you return to the screen, it can read the ini value, destroy the old weapon object, and create the new one. comparing global values and comparing ini values are both constant conditions so it is always destroying and creating the gun. same goes for "is application finished?" condition. i tried overlapping a pause with the sub app so i could use "end of pause," but it would stay paused after i left the sub app. basically, i'm looking for a way to do a "on application end" condition to identify when i close the sub app and are returned to the main frame.

    /////////////////////////////

    and is there a way to comment out events/group of events in MMF2? some way that is easier than creating a 'disable group of events' event or 'never' condition?

Similar Threads

  1. Making up names for guns
    By devripper in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 14th April 2012, 07:06 PM
  2. Guns firing and character walking at the same time
    By Malice in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 21st October 2009, 03:14 AM
  3. help with guns
    By fish in forum The Games Factory 2 - Technical Support
    Replies: 1
    Last Post: 21st December 2008, 03:23 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
  •