User Tag List

Results 1 to 4 of 4

Thread: Change collision behavior on press key

  1. #1
    No Products Registered

    Join Date
    Jul 2019
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Change collision behavior on press key

    Hey there, I need some help getting into CF2.5...

    At the start of the frame I set the following condition:

    Object1 collides with Object 2 --> Object1 stop

    Now I want to change the collision behaviour if a certain key is pressed:

    Upon Pressing "Space" ==> Object1 collides with Object 2 --> Object1 start (or does not stop, whatever...)

    How can this be done?

    Thanks in advance!

  2. #2
    Clicker Fusion 2.5

    Join Date
    Dec 2009
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Object 1 collides with Object 2 ---------> Object 1 stop
    + Repeat while "Space" not pressed

    Object 1 collides with Object 2 ---------> Object 1 start
    + Repeat while "Space" is pressed

    The 'repeat while space is pressed' statement can be negated so it acts as 'repeat while space isn't pressed'.

  3. #3
    No Products Registered

    Join Date
    Jul 2019
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks so far. It works, but my question was not precise as I wanted to switch the behavior permanently. However I've used your approach to do it like this, but I wonder if there is a better solution?

    Upon pressing "x" ---------> Set Global Value A to 1

    Object 1 collides with Object 2 ---------> Object 1 stop
    + Global Value A = 1

  4. #4
    Clicker Fusion 2.5

    Join Date
    Dec 2009
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you don't need the value to carry over different frames, perhaps use a flag instead of a global value? Or if you need more than 2 states (on/off) then use an alterable value maybe?

    Upon pressing "x" ---------> Set Flag 1 (Object 1) ON

    Object 1 collides with Object 2 ---------> Object 1 stop
    +Flag 1 (Object 1) is ON

    or

    Upon pressing "x" ---------> Set alterable value A (Object 1) to 1

    Object 1 collides with Object 2 ---------> Object 1 stop
    +alterable value A (Object 1) = 1

Similar Threads

  1. How do change collision shape?
    By gdog105 in forum Fusion 2.5
    Replies: 11
    Last Post: 9th July 2015, 08:42 PM
  2. Press key to centre display coords, press another key return to previous coords?
    By soopytwist in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 30th June 2015, 08:28 AM
  3. Replies: 6
    Last Post: 7th January 2015, 11:03 PM
  4. Can you change collision type at runtime?
    By Outcast in forum Fusion 2.5
    Replies: 1
    Last Post: 28th March 2014, 02:29 PM
  5. 256 R34 Behavior Bug : Object is not created but its behavior runs anyways
    By Shmuper in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 2nd March 2013, 07:15 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
  •