User Tag List

Results 1 to 6 of 6

Thread: RTS Selection Help

  1. #1
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Sumo's Avatar
    Join Date
    Jul 2008
    Posts
    642
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    RTS Selection Help

    So im working on this RTS game for iOS called "Medieval". I'm using an Active System Bpx box with a transparent inside so it's just a border thats able to be resized as the selection box when you click and hold the mouse button to select units. I'm trying to select units and create a small icon under the units that are selected, however with my coding its just creating numerous icons on top of each other. Normally I would use a "only one action when event loops" event, but then it messes up the troop selection for some reason. I'm using qualifiers by the way for all the troops. So at the moment my code looks like:

    +ASB Box is overlapping qualifier "neutral"
    -Create "selected icon" under feet of "neutral" qualifier.

    How would I be able to modify my code so only one selected icon is created and the selection code works entirely. Here's my .mfa file if you could look at it, that'd be great, thanks.

    https://dl.dropbox.com/u/4459105/Medieval/Medieval.mfa

    Oh and for some reason the selection doesn't work when testing in mmf2, but it works (with the bug) when you run it in xcode.

  2. #2
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    UrbanMonk's Avatar
    Join Date
    May 2008
    Location
    Southern U.S.A.
    Posts
    847
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Here you are!

    https://www.dropbox.com/s/bl6iwa597iwrm5a/Medieval.mfa

    I didn't test it with the iOS exporter, but the only foreseeable problem would be how it handles position data with the "Active System Box" object.
    If it still doesn't work you can use the position of the finger and the slide delta to select the objects.

  3. #3
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Sumo's Avatar
    Join Date
    Jul 2008
    Posts
    642
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Okay thanks, that fixes the selection during mmf2 runtime, but I need a way to have the icon selection objects only create one per unit and not stack on each other. The "only one action when event loops" doesn't work with the code i have at the moment.

  4. #4
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    UrbanMonk's Avatar
    Join Date
    May 2008
    Location
    Southern U.S.A.
    Posts
    847
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

  5. #5
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Sumo's Avatar
    Join Date
    Jul 2008
    Posts
    642
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    This is great, thanks UrbanMonk! I just added another event to deselect the icon if the selection box wasn't overlapping the troops and it works fine. Now I can continue on with my work. Thanks again!

  6. #6
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    UrbanMonk's Avatar
    Join Date
    May 2008
    Location
    Southern U.S.A.
    Posts
    847
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    No problem.

    I'm not sure how efficient this method is though. Destroying and creating a lot of objects every loop might cause slowdowns later, or it may not make a difference.
    Later on if you have any performance issues it might be worth deactivating that event just to make sure.

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. Box selection
    By StardustSpeedman in forum The Games Factory 2 - Technical Support
    Replies: 6
    Last Post: 7th April 2011, 02:55 PM
  3. ASB Selection Box
    By nivram in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 23rd November 2010, 09:04 AM
  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
  •