User Tag List

Results 1 to 3 of 3

Thread: ASB Selection Box

  1. #1
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,773
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)

    ASB Selection Box

    Anyone know a formula so that if the selection box is not completely over a unit it does not get selected?

    Thanks

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  2. #2
    No Products Registered

    Join Date
    Mar 2007
    Location
    Sydney, Australia
    Posts
    1,369
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: ASB Selection Box

    For like an RTS game?
    You would have to compare the x and y bounds against the units + an offset.

    For example:

    xleft("selection box") < x("unit") - xoffset) &
    xright("selection box") > x("unit") + xoffset) &
    ytop("selection box") < y("unit") - yoffset) &
    ybottom("selection box") > y("unit") + yoffset)
    then unit is within bounds

    Of course this would be based on the unit hotspot so you might need to define different offsets for each side (left, right, top, bottom) which you would probably have to store within the alt values of the unit so you can have different units of different sizes.

    I havnt used MMF in a while so I forget, but I think you get the actual left/right/top/bottom position of an active object which you could compare against also.

  3. #3
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,773
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)

    Re: ASB Selection Box

    Thanks uprize. I'll try that.

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

Similar Threads

  1. Selection Tool
    By basfus in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 28th September 2012, 11:59 PM
  2. RTS Selection Help
    By Sumo in forum iOS Export Module Version 2.0
    Replies: 5
    Last Post: 23rd September 2012, 12:37 AM
  3. Box selection
    By StardustSpeedman in forum The Games Factory 2 - Technical Support
    Replies: 6
    Last Post: 7th April 2011, 02:55 PM
  4. Edit Box: Selection
    By Looki in forum Released Extensions
    Replies: 1
    Last Post: 7th December 2008, 12:43 PM
  5. Arrow Key Selection
    By Martin_Bodger in forum The Games Factory 2 - Technical Support
    Replies: 4
    Last Post: 25th May 2008, 12:26 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
  •