User Tag List

Results 1 to 6 of 6

Thread: Multiple enemy's with sensors.

  1. #1
    No Products Registered

    Join Date
    Jun 2010
    Location
    Sutton, Surrey, UK
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Multiple enemy's with sensors.

    Hello. In my game, there will be multiple enemys, with AI and stuff, which is all programmed nicely, except... When it comes to programming their gravity and making them jump randomly, I'm forced to have to create a hidden floor sensor to detect floors (Theres Active floors as well as Backdrop floors). Positioning them individually was hard to do, and the method I ultimatly use is not efficient at all. When doing the positioning and stuff, i give the enemy and sensor an ID each, use the "ForEach" object. And do this:
    Value A("Enemy")=Value A("Sensor")
    +Position "Sensor" at Enemy.

    Works well. But when it comes to detecting the floors and stuff, I have no idea how to successfully do it. For testing purposes, I made the enemys stand still, and upon clicking them, it sets their Gravity to -5 to simulate a jump.
    I get some bizzare results. Sometimes the enemy endlessly goes upwards, sometimes all the objects fall through the floor except 1. Sometimes The enemy flies upwards futher than it should THEN starts falling randomly.

    Basically, how would i go about creating a sensor for multiple enemies? I'll upload an example of my problem as soon as I can to show what's going on.

    Thanks to all.

  2. #2
    No Products Registered

    Join Date
    Jun 2010
    Location
    Sutton, Surrey, UK
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Multiple enemy's with sensors.

    Here's an example, seem's my problem is worse than I thought when starting from the beginning. Any idea on how to fix it?
    View MFA

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

    Re: Multiple enemy's with sensors.

    "Alterable Value A of Object = Alterable Value A of Sensor"

    What? No. You don't even need to have IDs at all, and you don't even need more than one sensor! Just reuse the same sensor for each object.
    Working as fast as I can on Fusion 3

  4. #4
    No Products Registered

    Join Date
    Jun 2010
    Location
    Sutton, Surrey, UK
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Multiple enemy's with sensors.

    Woah, never considered the method of only using 1 sensor for all. How would I go about doing that? And would it still work with about 50 enemys onscreen?

    EDIT: Infact, how would I detect wether the floor is below the enemy?

    EDITEDIT: I have no idea what i'm talking about anymore.

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

    Re: Multiple enemy's with sensors.

    Just always run a ForEach loop for your objects, and on the ForEach loop, set the detector under the object, then test for standing on ground.
    Working as fast as I can on Fusion 3

  6. #6
    No Products Registered

    Join Date
    Jun 2010
    Location
    Sutton, Surrey, UK
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Multiple enemy's with sensors.

    Quote Originally Posted by LB
    Just always run a ForEach loop for your objects, and on the ForEach loop, set the detector under the object, then test for standing on ground.
    Holy **** dude! I have been tackling this problem for months now and you have helped me instantly! Thank you Soo much LB! Can't wait til the day comes where i'm just as smart as you

    Work's perfectly

Similar Threads

  1. Target Closest Enemy or Multiple Enemies
    By Gatesmi in forum Multimedia Fusion 2 - Technical Support
    Replies: 15
    Last Post: 25th March 2011, 08:34 PM
  2. Fast loop multiple enemy engine?
    By Mdsx in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 22nd April 2010, 05:11 PM
  3. Problem with multiple clones of enemy following me
    By DantronLesotho in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 29th October 2009, 04:58 AM
  4. Multiple Distances + Enemy Qualifer
    By Cossin in forum Multimedia Fusion 2 - Technical Support
    Replies: 12
    Last Post: 22nd February 2009, 07:45 AM
  5. multiple enemy healthbar help
    By Oreo in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 23rd November 2008, 03:44 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
  •