User Tag List

Results 1 to 6 of 6

Thread: "body is still" event?

  1. #1
    Clicker

    Fusion 2.5 DeveloperFusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleSWF Export Module
    xhedgehogx's Avatar
    Join Date
    Nov 2007
    Location
    NY, USA
    Posts
    743
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    "body is still" event?

    How do I do that with the phizix chipmunk extention? For example, I have a ragdoll when the player dies, and I want to restart the level when the body isn't moving anymore.

    Thanks.

  2. #2
    Clicker

    Fusion 2.5 DeveloperFusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleSWF Export Module
    xhedgehogx's Avatar
    Join Date
    Nov 2007
    Location
    NY, USA
    Posts
    743
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: "body is still" event?

    I don't know if bumping is allowed, so I'll apoligize now and never do it again, but I really need an answer to this question.

  3. #3
    No Products Registered

    Join Date
    Jul 2006
    Location
    Umeå, Sweden
    Posts
    1,090
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: "body is still" event?

    get the absolute value of the bodies x and y velocity and if they are lower than the value of your choice (will most likely never be zero) they are lying still...

  4. #4
    Clicker

    Fusion 2.5 DeveloperFusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleSWF Export Module
    xhedgehogx's Avatar
    Join Date
    Nov 2007
    Location
    NY, USA
    Posts
    743
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: "body is still" event?

    Alright, thanks a lot! I got it working now, it's kind of glitchy (going straight up counts as lying still I guess).

  5. #5
    No Products Registered

    Join Date
    Jul 2006
    Location
    Umeå, Sweden
    Posts
    1,090
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: "body is still" event?

    No.. but to make sure it's not about to fall down afterwards... make it add to an alterable value when the body is considered still.. (reset to zero when it's moving)... then if the value is greater than say 50, it has been considered still for 1 second...

  6. #6
    No Products Registered

    Join Date
    Feb 2007
    Posts
    199
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: "body is still" event?

    When i have a custom movement and i want to tell if an object is still or moving then i record the old xy positions from 1 second ago (or less to be more accurate) then compare them with the current position.

    I find it easier to store them in alt strings.

    Rename alt string A of the object to "oldXY" or something.
    Rename alt string B of the object to "currentXY"

    every 1 second - set alt string "oldxy" to str$(get object + str$(get objectY)

    Always - set alt string "currentxy" to str$(get object + str$(get objectY)


    Now compare alt strings;

    currentXY <> oldxy then object is moving.
    currentXY = oldxy then object is still.



Similar Threads

  1. Help! - Multiple "Which animation is playing?" Conditions in same event line.
    By ezzypixel in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 15th October 2013, 02:18 AM
  2. Question about the "body parts" tutorial and collision
    By raymond54321 in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 30th May 2013, 07:51 AM
  3. Event Editor: Little "B" in bottom-left corner of my objects
    By King_Cool in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 12th December 2011, 08:08 PM
  4. [Phyzics] How to "pin" a body
    By Surmulot in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 25th September 2008, 05:24 PM
  5. Phizix- Anyway to get a "body" to collide with....
    By xhedgehogx in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 1st February 2008, 06:11 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
  •