User Tag List

Results 1 to 4 of 4

Thread: Expression help: How to select path

  1. #1
    No Products Registered

    Join Date
    Apr 2011
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Expression help: How to select path

    Hi, new to the forum
    This is making my head hurt!
    I've already searched in here, in Nivram's site, even in Gamebuilder.info, there I downloaded the sample "Simpe following (delayed mouse paddle control sample)", which is nice, but didn't help me solve this.


    What I need help with is this:
    I have a dwarf and it has 3 possible movement paths,
    In the stage there are 3 clickable boxes (two Wrong boxes and one Correct box).
    So, if the player takes too long, there's an animation that will move the dwarf to the position of the correct box.

    My thoughts were that this could be solved with an expression editor, something like:
    Check Correct box's X position, if Correct box it's at position A, start movement 1 (which is path #1),
    and if at position 2 animate using path 2

    Or, create 3 conditions? like:
    After 5 seconds:
    If Correct Box is at position X1, start movement 1?
    If Correct Box is at position X2, start movement 2?
    If Correct Box is at position X3, start movement 3?


    EDIT: Using the simple following example mentioned at the start of the thread, I tried deactivating it and only activating it after the time ran out, I thought it'd start running but no luck.

    thanks!

  2. #2
    No Products Registered

    Join Date
    Apr 2011
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Expression help: How to select path

    Managed to make it almost work using the sample code, deactivating and activating it, but even if I destroy it, and creating a new one, it still saves the Correct box position.
    Well, it's an advance

  3. #3
    No Products Registered

    Join Date
    Jul 2009
    Location
    Facebook
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Expression help: How to select path

    what you could try is have it go to whatever box the player clicks, then randomly call wether or not that box was the correct box.

    like,

    if: player selects box (and) random value = true,
    box = correct box

    or something like that

  4. #4
    No Products Registered

    Join Date
    Apr 2011
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Expression help: How to select path

    Hi Izik and thanks a lot, I took a siesta and dreamt a solution!
    1.- At the end of turn, create 3 objects, one for each box,
    2.- See if any of them overlaps with the correct box
    3.- If it overlaps, select according movement:
    (if object #1 overlaps with Correct box, use movement #1,
    if object #2 overlaps with Correct box, use movement #2
    if object #3 overlaps with Correct box, use movement #3)

    thanks!

Similar Threads

  1. What does the Kernel object's expression "getDriveType(path)" represent?
    By RGBreality in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 10th November 2011, 05:33 PM
  2. Path Maker (Advanced Path Movement) for BIG levels
    By StingRay in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 22nd June 2010, 02:14 PM
  3. [Request]Select Object - Select in events?
    By LB in forum Extension Development
    Replies: 1
    Last Post: 15th July 2009, 10:55 PM
  4. Path Maker for Advanced Path Movement
    By Willi Leopold in forum Extension Development
    Replies: 9
    Last Post: 15th November 2006, 03:23 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
  •