User Tag List

Results 1 to 6 of 6

Thread: TD

  1. #1
    No Products Registered

    Join Date
    Jul 2010
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    TD

    Hi, I'm doing a tower defence game. I have one tower to choose on the side of the screen. If I click it how can I place it? And also when I place it I want a range area object to be set around the tower, how? :S
    And one more, If I click my placed tower, I can click it and my range object will change to "reappear" and then "set semi-transperant. Is there an condition similar to "If left-click on anything except "Tower" then..." I'd like to find anything to do it
    Thnaks

  2. #2
    No Products Registered

    Join Date
    Jul 2006
    Location
    Cape Town South Africa
    Posts
    192
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: TD

    You could try use the drag object plug-in or just simple use

    'repeat while mouse button pressed
    +mouse overlapping object
    set object x,y to mouse x,y + the offset


    Just always set the range object at 0,0 from the tower

    Last one I don't understand very well but;

    'User click mouse button
    +negate mouse pointer over the object

  3. #3
    No Products Registered

    Join Date
    Jul 2010
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: TD

    How can I do "set object x,y to mouse x,y + the offset"?

  4. #4
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: TD

    Always:
    -Set X Position to XMouse
    -Set Y Position to YMouse

    The expressions XMouse and YMouse can be typed in or retrieved from the keyboard and mouse obejct.
    Working as fast as I can on Fusion 3

  5. #5
    No Products Registered

    Join Date
    Nov 2009
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: TD

    Rather:
    Code:
    1 User clicks with left button
    2		TOWER: Set active to 0
    3 User clicks with left button on TOWER
    4		TOWER: Set xoffset to XMouse - X(TOWER)
    5		TOWER: Set yoffset to YMouse - Y(TOWER)
    6		TOWER: Set active to 1
    7 active(TOWER) = 1
    8		TOWER: Set X position to XMouse + xoffset
    9		TOWER: Set Y position to YMouse + yoffset

  6. #6
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    RickyRombo's Avatar
    Join Date
    Mar 2008
    Location
    Somewhere between here and there
    Posts
    3,167
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: TD

    That won't work because when the user clicks again to place the tower, it will also click on the tower again and override the first condition.

    Try

    * User clicks with left button on TOWER
    -- TOWER: Set xoffset to XMouse - X(TOWER)
    -- TOWER: Set yoffset to YMouse - Y(TOWER)
    -- TOWER: Toggle flag 0

    * TOWER: Flag 0 is on
    -- TOWER: Set X position to XMouse + xoffset
    -- TOWER: Set Y position to YMouse + yoffset

Posting Permissions

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