User Tag List

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

Thread: Need help on the events (for shoot-em-up game)

  1. #1
    Clicker Multimedia Fusion 2
    MeisterEl's Avatar
    Join Date
    Jun 2012
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need help on the events (for shoot-em-up game)

    I'm new to the engine and trying to build a shoot-em-up game to learn how to use the events, so probably I'll keep posting questions here (a Dodonpachi style game)
    sorry if I asked for some noobish questions =w='' here goes...
    ---
    Q1:
    I have bullets launched from the player ship, and I've associated collision mask objects on each bullet.
    I'm trying to make the bullet destroyed while the associated collision mask has hit the enemy,
    but I've not much clue on how to pick up the correct bullet, that should be destroyed with the collision mask.
    Have already gave the bullets and collision mask spread values on one Alterable Value, checked on the debugger that the bullets have unique values,
    but is there a way to pick up the spread value of the collision mask, then destroying the bullet with the same spread value?

    Annnnd....I don't know if using the spread value is the correct method to do the trick, figure me out if I've done the wrong way

    (Edited) nvm for this question, I think I've solved it by using an extra Alterable Value =D
    ---
    Q2:
    Right now I'm trying to figure out each condition's meaning, and came across this one...

    New Object > Pick object with reference to their value > Alterable

    If I've picked "Alterable Value A", is it gonna be applying to all objects' "Alterable Value A"(first value) and compare their values?

    (Actually I'm doing a spreadsheet to list out all the functions of the conditions/actions, so I'm really curious if there's already a listing on the Internet....
    I think it's really a painful task for newbs to learn on the engine, so I'm gonna work out one for my own sake lol)

  2. #2
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Jaffob's Avatar
    Join Date
    May 2008
    Location
    USA
    Posts
    1,833
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    1) A simpler and more stable solution would be to use fixed values. Every instance of every object has a fixed value, which is a (seemingly) random number unique to that instance. You could associate bullet objects with their collision masks by storing the fixed value of the bullet in an alterable value of the collision mask. Then for the collision event, also test if the fixed value of "Bullet" equals the alterable value of "Collision Mask".

    2) This condition is largely useless, because you can't apply an action to all selected objects of any type. You apply actions to specific objects, but in this case it would be cleaner to use that object's compare alterable value condition. That in mind, I've attached a quick example I made which should be easier to understand than a written explanation (I made the example because I wasn't sure myself how this works).

    Also, MMF has documentation that outlines what every action, condition, and expression does.
    Attached files Attached files

  3. #3
    Clicker Multimedia Fusion 2 DeveloperiOS 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)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Better way of doing this:

    ( 1 )
    Give your Bullet a new animation called "Collision Mask".

    ( 2 )
    In the Event Editor do

    Allways:
    - Change animation sequence to "Collision Mask".

    If Bullet collides with Enemy:
    - Destroy Bullet

    Allways:
    - Change animation sequence to "Stopped".

    ( its better if the Bullets arent animated with this method )

    ...
    If this doesnt work out for you i have another solution in mind

  4. #4
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Jaffob's Avatar
    Join Date
    May 2008
    Location
    USA
    Posts
    1,833
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That technique is an incredible idea, King_Cool, I'm surprised I never thought of it.

    I tested it though, and unfortunately it doesn't work. Collisions must be calculated at the same time as the frame is redrawn, which means the collision mask you are using must be the one the user sees.

  5. #5
    Clicker Multimedia Fusion 2 DeveloperiOS 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)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Jaffob View Post
    That technique is an incredible idea, King_Cool, I'm surprised I never thought of it.

    I tested it though, and unfortunately it doesn't work. Collisions must be calculated at the same time as the frame is redrawn, which means the collision mask you are using must be the one the user sees.
    Im not sure what your saying here, but the method works fine for me.
    Here, i made an example illustrating it:
    Attached files Attached files

  6. #6
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Jaffob's Avatar
    Join Date
    May 2008
    Location
    USA
    Posts
    1,833
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah, you're right. Seems like it doesn't work with triggered conditions like X collides with Y or X leaves the play area. But with evaluated conditions like X overlaps Y it works just fine.

  7. #7
    Clicker Multimedia Fusion 2
    MeisterEl's Avatar
    Join Date
    Jun 2012
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Never thought there's a way to implement the mask within object, wow....really thanks for King Cool's suggestion =D
    And also thanks for Jaffob's too, seems it is better to apply this method on associating Collision Mask on animated enemy objects

    About the event editor, I'm wondering on the nature of these coding...
    I mean, does running through each loop of the general list, represent 1 frame of the application?
    I don't have much knowledge on program stuff so I'd like to catch up on the details of the engine Xd

  8. #8
    Clicker Multimedia Fusion 2 DeveloperiOS 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)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by MeisterEl View Post
    does running through each loop of the general list, represent 1 frame of the application?
    Yep
    The visual screen uppdates at the end of each itteration ( Event Editor loop ) i think.

    I do know about a third method wich i believe is superior to the others, shout if you want me to explain it.

  9. #9
    Clicker Multimedia Fusion 2
    MeisterEl's Avatar
    Join Date
    Jun 2012
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by King_Cool View Post
    Yep
    The visual screen uppdates at the end of each itteration ( Event Editor loop ) i think.

    I do know about a third method wich i believe is superior to the others, shout if you want me to explain it.
    Glad to have a chance to learn something new, mind telling about the details? =D

  10. #10
    Clicker Multimedia Fusion 2 DeveloperiOS 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)
    King_Cool's Avatar
    Join Date
    Aug 2008
    Posts
    2,335
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PART 1: CREATE YOUR OBJECTS
    To create a system wich supports multiple Objects, lets say Rockets, each with their own individual collision masks you first need 2 Objects.

    ROCKET SPRITE, the visual rocket
    - Give this Object an AltValue called 'Health_'

    ROCKET MASK, the collision mask ( !!! this should never change shape, and does not need to be vissible to the Player )
    - Give this Object an AltValue called 'Health_' ( !!! Initial value higher than 0 )

    PART 1: IMPORTAINT RULES
    - Treat the Rocket Mask as the actuall rocket, meaning its the Rocket Mask wich has movement, behaviour and interacts with the wordls objects like Enemies and Obstacles.
    - !!! It is importaint that whenever you want to create a new Rocket, you have to create a Rocket Sprite and a Rocket Mask at the same time.

    PART 3: THE EVENT EDITOR
    Now in the Event Editor do:

    If Rocket Mask collides with Obstacle
    - Rocket Mask set Health_ to 0

    If Rocket Mask collides with Enemy
    - Rocket Mask set Health_ to 0

    Allways
    - Rocket Sprite set position to Rocket Mask
    - Rocket Sprite set Health_ to 'Rocket Mask Health_'

    If Rocket Mask Health_ is lower or equal to 0
    - Destroy Rocket Mask

    If Rocket Sprite Health_ is lower or equal to 0
    - Destroy Rocket Sprite

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Android shoot em up game MAD in development
    By AftPeakTank in forum Android Export Module Version 2.0
    Replies: 14
    Last Post: 16th August 2013, 10:08 AM
  2. Timer Events/Restrict actions vs in-game counters
    By Cossin in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 28th June 2010, 08:07 PM
  3. Synchronizing Game Events to Real Dates/Times
    By toader in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 11th October 2007, 06:27 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
  •