User Tag List

Results 1 to 4 of 4

Thread: How do I do this?

  1. #1
    Clicker Multimedia Fusion 2
    Fusion 2.5 (Steam)

    Join Date
    Oct 2011
    Location
    Oregon
    Posts
    127
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How do I do this?

    I need to detect exactly which object the player is clicking on, and then switch it with another object... but all of the objects are the same. (There's a few hundred, so yeah.)
    Is there any way to do this?

    I've seen a lot of games do similar things, but can't quite figure it out myself.

  2. #2
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module
    Francois's Avatar
    Join Date
    Jul 2006
    Location
    Montpellier, France
    Posts
    6,920
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)

    Re: How do I do this?

    If you have a large number of different objects, you should assign a qualifier to each one of them (in the properties of the object itself).
    Then under the event editor; use "User clicks on <Qualifier>", and do your stuff.

  3. #3
    Clicker Multimedia Fusion 2
    seripa's Avatar
    Join Date
    Oct 2011
    Location
    Australia
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How do I do this?

    if "block" was the name of the object you wanted to swap with another object...

    create these objects:
    block - active
    cooldown - counter
    objectgrab - counter
    process - counter
    storex - counter
    storey - counter
    newx - counter
    newy - counter


    start of frame : spread value 1 in alterable value a of object block
    while cooldown > 0 : subract 1 from cooldown
    upon click block AND objectGrab = 0 AND cooldown = 0: set ObjectGrab to value a of block, set cooldown to 10 , set storex to x('block") , set storey to y("block")
    upon click block AND objectGrab > 0 AND cooldown = 0: set process to 1, set cooldown to 10, set newx to x('block") , set newy to y("block"), set block flag0 to on


    process = 1 AND block flag0 is on : set block x position to storex, set block y positon to storey
    process = 2 AND pick objects with reference to value a = objectgrab : add 1 to process , set block x positon to newx, set block y position to newy
    porcess = 3 : set process to 0, set objectgrab to 0

    unless I've made a silly mistake I'm pretty sure this will work.

  4. #4
    festa12345
    Guest

    Re: How do I do this?

    Thanks for sharing.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •