User Tag List

Results 1 to 2 of 2

Thread: AI Wall Detection and Object Scope

  1. #1
    No Products Registered

    Join Date
    Oct 2012
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    AI Wall Detection and Object Scope

    Hello everyone.

    I'm trying to make a platformer with custom movement and collision detection, but I'm having trouble with the collision detection.

    Here's what I have so far: Square Unicolor Object Game.mfa

    The problem is with events 36 and 37. Basically, I've got AI objects randomly moving left and right. I want them to be stopped when they try to pass through a Ground object, but they're not stopping.
    In case you can't or don't want to see the program, here's a sample event:
    +Float X (AI) > X (Ground) - 32
    +Float X (AI) <= X (Ground) -1
    +Float Y (AI) > Y (Ground) -31
    +Float Y (AI) < Y (Ground) +31
    => Set Float X (AI) to X (Ground) - 32
    Float X and Float Y are alterable values I used to be equivalent to the AI's position coordinates.
    I thought this would make any AI objects overlapping any Ground objects from the Ground objects' left sides would be moved directly to the left of the Ground object.

    I'm guessing the problem has something to do with object scope, which is something I still don't understand well.

    Can anyone clue me in on anything I'm doing wrong here (or shouldn't be doing at all)?
    Also, does anyone know some good object scope tutorials for selecting the instances of objects you want?

    Thanks,
    Icicle

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module
    tompa's Avatar
    Join Date
    Nov 2011
    Location
    Uppsala, Sweden
    Posts
    358
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    line 37
    the ground/platform that Float X is taken from, has no reference

    I'd advice to scope by fastloop/spreadvalue until enough aspects are learned, it would be a suitable option for your application.
    I think Danny did a tutorial for this.

Similar Threads

  1. Object scope/instance help understanding
    By Scynscyn in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 15th June 2014, 03:18 PM
  2. Surface object or shaders in Flash (scope cross hairs)
    By KLiK-iT in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 2nd September 2012, 07:32 AM
  3. Destroying an object that crashes with the wall
    By FlinkGigitty in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 2nd October 2010, 11:34 PM
  4. Object gets stuck in wall
    By Winston in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 15th September 2009, 09:55 PM
  5. How do I make an object spin when it hits a wall?
    By Vackin in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 28th October 2007, 04:48 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
  •