User Tag List

Results 1 to 2 of 2

Thread: Move Safely 2 Object and Looping

  1. #1
    No Products Registered

    Join Date
    Jul 2006
    Posts
    492
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Move Safely 2 Object and Looping

    Hi,

    I've been using the move safely 2 object to try and optimise some of the code in my game.

    The problem I'm having is using it inside of MMF fastloops. I'm trying to use it for testing line of sight between the player and the enemy soldiers. It works by looping through each soldier in turn and testing the line of sight between the soldier and the player. This is what my code looks like:

    On loop "soldier"
    +Value A "soldier1" = loopindex "soldier"

    - set X position "detector" to X "soldier1"
    - set Y position "detector" to Y "soldier1"
    - Prepare safety "Move Safely 2"

    On loop "soldier"

    - set X position "detector" to X "player"
    - set Y position "detector" to Y "player"
    - Commence safety "Move Safely 2"

    On safety
    + "detector" is overlapping a backdrop
    + Fixed "detector" = GetFixedValue "Move Safely 2"

    - Set value A "detector" to 1
    - Stop (leave in obstacle) "Move Safely 2"

    On safety
    + Fixed "detector" = GetFixedValue "Move Safely 2"
    + "detector" is overlapping "player"

    - Set value A "detector" to 2
    - Stop (leave in obstacle) "Move Safely 2"

    If the detector value is 1, the soldier is set to not be able to see the player, if it is 2, the soldier is set so that he can see the player.

    The problem is that it just doesn't seem to work at all. The first time I tried it (without the + "detector" is overlapping "player" conditions) it crashed the program as soon as a soldier entered the game. Now, though, it just acts as if the soldiers can be seen through walls.

    Hope someone knowledgable about MS2 can give me some pointers. Thanks in advance.

  2. #2
    No Products Registered

    Join Date
    Jul 2006
    Posts
    492
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Move Safely 2 Object and Looping

    Ok I just found the solution to this problem. For whatever reason, the - Stop (leave in obstacle) action doesn't seem to work properly.

    If anyone else has similar problems with the Move safely 2 object, try using the - Stop (lepush out of obstacle) action instead. It worked for me.

Similar Threads

  1. Help with the Move Safely 2 object
    By vertigoelectric in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 5th February 2009, 06:05 PM
  2. Move Safely Object Help
    By Roseweave in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 14th January 2008, 05:06 PM
  3. Move Safely 2 Object help
    By Raphael in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 19th September 2006, 07:19 PM
  4. Bug: Move Safely 2 Object
    By netninja in forum File Archive
    Replies: 10
    Last Post: 8th September 2006, 08:19 AM
  5. move safely object help.
    By Clicktastic in forum Multimedia Fusion 2 - Technical Support
    Replies: 20
    Last Post: 14th August 2006, 10:10 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
  •