User Tag List

Results 1 to 8 of 8

Thread: Hello all - new to MMF - learning with a quick question

  1. #1
    No Products Registered

    Join Date
    Feb 2014
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Hello all - new to MMF - learning with a quick question

    Hi all I just started trying to learn MMF to eventually begin creating 2d games for the OUYA console. Not really for sale but more a hobby until Im decent.

    Im working on sort of a "Link to the Past" style of play game and have started building small nonsense versions of tests and I continue to run into an issue where my character slashes and takes damage the same time the enemy does.

    I have my action point at the end of his sword which is right now one blob of a sprite. Does the sword have to be a separate item attached to the character to avoid this?
    Or is there a simple way to say when attacking he does not receive damage. The problem I see with the second thought is I would still like the finished character to take damage from the sides and back when attacking but just not the front.
    Should I surround the hero with collision detectors and put in an entry for each one of those?
    thanks

    PLEEEEEEEEEEEEEEEEASE dont laugh yet, this is really my first attempt at learning and I have been hitting tutorials and youtube like crazy....

    Im MUCH better at making actual characters and animation lol
    Attached files Attached files

  2. #2
    Clicker Fusion 2.5Android Export ModuleSWF Export Module
    Ziplock's Avatar
    Join Date
    Oct 2013
    Posts
    448
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice first start - looks like you're getting it! Stick with it.

    Here's the simple way for "attacking does not receive damage" idea. Your code as it stands reads:

    Line 3:

    + Player animation "Launching is playing"
    + Collision between Player and Enemy
    + Only one action on loop
    -> Subtract 1 from enemy counter


    Line 6:

    + Collision between Player and Enemy
    + Only one action on loop
    -> Subtract 1 from player counter



    These two lines are going to act in consort because there's nothing in line 6 to say "don't subtract from player counter if his sword is out."

    My quick fix was to add '+ Player animation "Launching is NOT playing"' to line 6. This gives you a TRUE/FALSE effect. Copy the line from 3, right click, and select Negate.

  3. #3
    Clicker Fusion 2.5Android Export ModuleSWF Export Module
    Ziplock's Avatar
    Join Date
    Oct 2013
    Posts
    448
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Now as you pointed out, this is buggy because the player can just slam into the enemy and draw his sword without even needing it to hit the enemy. To help, collision detection is the way to go.

    Insert a new active object, fill it with any color, reduce it down to a few pixels (maybe 5x5), set the hot spot to center, make it invisible to start, and name it "detector".

    Add a line to the end of your code:

    + Always
    ->Select position (Detector) Relative to Player (Action Point)

    Then change line 3 from +Collision between Player and Enemy to +Collision between Detector and Enemy


    Now this is still pretty crude, but hopefully it gets you on the right track. If you need to debug, it always helps to set your invisible objects to visible.

    Anyway, good luck and happy coding!

  4. #4
    No Products Registered

    Join Date
    Feb 2014
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks man, appreciate it. I have ZERO coding experience aside classes in college (which I stunk at) and web design CSS/HTML (which really doesnt count).

    I have been trying to find as much info as possible.

    Ill try to add the collision detectors in there later and pop it up.
    BIG help!

  5. #5
    No Products Registered

    Join Date
    Feb 2014
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Application.mfa

    so I have been toying more and have been trying to get the collisions to work and have the particular detectors follow the way the character is facing to specify what damage go where but Im not sure Im getting it.

    I then decided to try and have a small detector at the tip of the sword that would strike then dissapear after it was say 15 pixels from the player so it was more a sword strike and not a bullet but man I screwed that up. It just keeps shooting from off the playable area where it is stored on the side lines.

    Is there an easier way to get the collsions detectors to follow the guy. In the way of the front CD will always follow his face no matter what direction he is facing or is the way I did this the only way?

    Thanks all

    as soon as I get past this I want to get into the enemy AI and have a few good tuts and videos on that.

  6. #6
    Clicker Fusion 2.5Android Export ModuleFirefly 3D Module

    Join Date
    Sep 2010
    Posts
    577
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Player: animation "Attack"(Or whatever you named it) is playing + Player: value of frame =8 (for example...depends on when you want it to appear. but frame 0 is the first frame) then have your detector appear at the tip of the sword (Player: is of course your active object currently set as player character) Hope it makes some sense and when attack animation is over just position your detector out of the game area for example

  7. #7
    Clicker Fusion 2.5Android Export ModuleSWF Export Module
    Ziplock's Avatar
    Join Date
    Oct 2013
    Posts
    448
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not sure I'm getting what you're asking. Here's the .mfa of my fix. Now what else did you want the hero/villains to do? Here was my fix, but I left the detector visible.
    Attached files Attached files

  8. #8
    No Products Registered

    Join Date
    Feb 2014
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey ziplock, that is kind of what I was going for. I think I was overthinking it.

    Bascially Im going to have one boss with smaller helper enemies. I wanted to be sure that when head on attacking the boss other enemy attacks will still do damage when attacking from other angles.

    Thanks
    Im just learning this so this isnt really the game I want to make, its just smaller little bits to help me get what I have to do

Similar Threads

  1. Quick question.
    By Jacob_Miller in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 6th February 2011, 02:01 AM
  2. Learning MMF 2: Space invaders like game question
    By Luis in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 6th September 2010, 01:53 AM
  3. Really Quick Question
    By variant in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 14th December 2009, 01:04 AM
  4. Quick question
    By imamariobro in forum The Games Factory 2 - Technical Support
    Replies: 3
    Last Post: 4th November 2009, 10:33 PM
  5. Quick question
    By lembi2001 in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 6th May 2008, 09:08 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
  •