User Tag List

Results 1 to 6 of 6

Thread: More than 1 Enemy (Active Object)

  1. #1
    No Products Registered

    Join Date
    Sep 2009
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    More than 1 Enemy (Active Object)

    Hi guys.
    I have this little question. I made this Active Object like an enemy, that takes 3 hits (Buster Collision) to destroy. (I mean, each collision between Enemy-Bullet will decrease "HP Alterable Variable", and when HP reaches 0, the enemy is destroyed).

    But that doesn't work if I insert more than 1 Active Object (Enemy).... Is there a method to, for example, give each Enemy an unique I.D. so they can be independent?

    Same thing happen with Buster (Bullet that my player throws by pressing Fire button 4). The player is able to shoot 3 bullets per screen, and the direction of the bullet is controlled by the Direction of the player, but the problem is when the player is facing right, then a bullet is fired, then the player goes left, the bullet turns left too... I think there should be a way to "independize" the bullets.

    Please help.. thanks.

  2. #2
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    RickyRombo's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere between here and there
    Posts
    3,167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: More than 1 Enemy (Active Object)

    For the first question, MMF2 should automatically select the objects if you're doing it right. EG "Collision between Buster and Enemy -> Subtract 1 from Alterable Value("Enemy")" and then "Alterable Value("Enemy") = 0 -> Destroy Enemy"

    For the second, are you "Launching" the buster, or creating and then manually setting the direction? If you are manually setting it, create the object before setting the direction. That way MMF2 will only select the object that has been created. Also don't manually select the direction after "Launching" an object - MMF2 won't select the specific object and all Busters will change direction

  3. #3
    No Products Registered

    Join Date
    Sep 2009
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: More than 1 Enemy (Active Object)

    Maybe I didn't explain good the first question. When I insert 1 active object, the collisions are detected good; the enemy is destroyed when 3 bullets are collisioned. The problem is when I make copies of the same enemy in the whole level. Even if I just make 1 copy of it (2 enemys); I can't eliminate them by shooting 3 bullets to each one. I have to shoot 6 bullets to both of them (I think the Alterable Variable HP is shared).

    I want to make the 2 objects inserted to be independent.

    And for the second question, yes, I'm creating and object and then set the direction. I'll try what you said, thanks.

  4. #4
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    RickyRombo's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere between here and there
    Posts
    3,167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: More than 1 Enemy (Active Object)

    The objects should be selected - how are you testing for the Alterable value = 0? It seems as though you must be using "Compare two general values" instead of "Compare to an Alterable Value"

    Alterable Values are not shared. Subtracting from enemy's alterable values should work as long as they belong to an object in the collision - in other words, if a bullet collides with wall set alterable value of enemy to 1 would set all enemy's alterable values to 1 because it isn't selecting an enemy.

    Check your debugger to see if the alterable values are being changed as a whole or if the one that has had the collision is the only one who's alterable value is changing. If the enemy is the only one with the alterable value changing its on the testing for zero end, if not then its on the subtraction end.

    That info will help me help you

  5. #5
    No Products Registered

    Join Date
    Sep 2009
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: More than 1 Enemy (Active Object)

    About the bullets, I still don't know how to fix it. How should I set the direction of the bullet before shooted? Because, I set the movement with X("Bullet")+1 or -1 depending on the direction of the player. Is there another way to make the bullet being shooted?

    Thanks

  6. #6
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    RickyRombo's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere between here and there
    Posts
    3,167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: More than 1 Enemy (Active Object)

    Have the shooting event test for the direction of player -

    *User shoots Bullet //whatever button or whatever launches the bullet
    +User is facing direction (All left directions plus down) //it can be plus up, too, it doesn't matter which is which - just make sure all directions are covered.
    -("User") Launch an object ("Bullet") from 0,0 in direction <-

    *User shoots Bullet
    +User is facing direction (All right directions plus up)
    -("User") Launch an object ("Bullet") from 0,0 in direction ->

    EDIT: If you still need help I won't be able to reply until tomorrow

Similar Threads

  1. Using the Platform Movement Object for multiple instances of one enemy, help!
    By edman3d in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 29th August 2017, 12:46 PM
  2. Wave-Like Enemy/Object
    By vSv in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 18th May 2013, 03:36 PM
  3. Active object vs Active picture
    By stillhawk in forum Multimedia Fusion 2 - Technical Support
    Replies: 14
    Last Post: 25th November 2007, 04:59 PM
  4. Advice about Active Object vs Active Picture
    By Pablo in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 11th October 2007, 02:40 PM
  5. How can I set enemy object to follow my character?
    By The Thinker in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 6th November 2006, 12:18 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
  •