User Tag List

Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 11 to 20 of 27

Thread: Changing which active object the user controls

  1. #11
    Clicker Fusion 2.5

    Join Date
    Aug 2014
    Location
    Hawaii
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the replies!

    @schrodinger Thanks for the example, I've been playing with it for a while. It took me a while to figure out a few things but it makes sense now, and I know how to use qualifiers which is a really cool thing. The problem is, I ran into an issue when I went to use them for how I envisioned it (see my reply to mobichan)

    @mobichan Yeah, I took what I saw with schrodinger's example and tried to change it to the original where you select a key. In my example, I made 3 turrets and set them to a qualifier, then used keys "A", "S" and "D" for the three turrets. The problem came when I had to set the "Player.Global flag 0 on". In schrodinger's example, it was setting flag 0 on to whatever object was clicked on, but I wasn't clicking on anything, I was clicking a key. I ended up getting it to work using global variables to store the x and y coordinates of where the missile spawns. So if you hit "A", the globals are set to the x / y coordinates for turret 1. If you hit "S", the globals are set to the x / y coordinates for turret 2...etc.. Then I coded the missile to start at the global x / y coordinates instead of the Group.Player qualifier. As you said, I ended up not needing the qualifiers.

    So here is the problem. This seems to work (I'm still playing around with it and tweeking some stuff) but so far so good, and for Missile Command, its perfect. However, I'm already thinking ahead and I see huge issue. How am I able to select between two active objects if they are all moving and not in a fixed position? A good example is a football game on defense, where you control the guy you select.

    I'd like to say "when you hit the 'A' key, the left turret is the one to use, regardless of where its at".

    Ideas?

  2. #12
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    Yes, you can use qualifiers!
    (Did I mention I find them really handy? )

    sorry I skipped original missile command so I didn't know how selection was setup,
    anyway for key selection,
    you can just do something like:

    On keypress "A"
    OR
    On keypress "S"
    OR
    On keypress "D"
    >>> set group.player flag 0 off

    On keypress "A"
    >>> set turret 1 flag 0 on

    On keypress "S"
    >>> set turret 2 flag 0 on

    On keypress "D"
    >>> set turret 3 flag 0 on

  3. #13
    Clicker Fusion 2.5

    Join Date
    Aug 2014
    Location
    Hawaii
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No worries, you answered my question how I asked it. It was my fault for not specifying exactly what I was after.

    I'm still not able to get it to work for an object vice a coordinate.

    The two methods from you and mobichan: click on the object (qualifiers method), or code the X,Y coordinates of the object (using globals) work for stationary objects. I'm really interested in doing for an object that changes position. I'm wanting to do a small twist to the game. Instead of missile turrets, having moveable ground to air vehicles that you can select and move. So the whole intent was to learn how to "select the object for action" (regardless of location) with a keystroke. Check my latest mfa, you'll see where I'm trying to use the qualifiers and setting the individual turret flag 0 to on, however, the missile will not spawn at the other turrets.


    Attached is my attempt to go back to qualifiers with that sample you gave, but I'm somehow just not understanding why its acting the way it is. It fires all turrets and the missiles explode at (0,0) and at the aimpoint. Very weird.
    Let me know where I'm going wrong with this, it seems I'm still not quite up to speed on the way to implement this, sorry

    https://www.dropbox.com/s/bmgou3okt1...mmand.zip?dl=0

    wiggy

  4. #14
    Clicker Fusion 2.5

    Join Date
    Aug 2014
    Location
    Hawaii
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm...

    Well I got it! Kinda, lol.

    I can now switch to an object without clicking and / or specifying the coordinates!
    But I have two bugs (please show me how to debug) that have been in there ever since I introduced the qualifiers.
    1.) The missiles still explode at (0,0) on the frame.
    2.) All the missiles on the frame are destroyed when the user clicks the mouse to fire a missile.

    But at least I can switch now between the turrets with a keystroke, haha!

    Here is the latest tweak, ideas?

    https://www.dropbox.com/s/tl9utdugoo...and_2.zip?dl=0

    wiggy

  5. #15
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    Hello wiggy,

    for turret selection you can just setup this way:

    turrsel.jpg

    for reactivating missiles, you must switch the "missile creation" action position and drag it up,
    because only if you put your actions after the creation of the missile,
    all subsequent actions will affect that single instance:

    fire.jpg

    I suggest you take a look at the "event list" editor if you don't already

  6. #16
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator ProPatch Maker

    Join Date
    Apr 2013
    Posts
    43
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi !

    I would also suggest that you do something about the trail Objects. After a little while there are many of them. Almost 1000. Not so good if you want to deploy to a mobile platform, I guess...

  7. #17
    Clicker Fusion 2.5

    Join Date
    Aug 2014
    Location
    Hawaii
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ouch,

    That's the second time that the "event list editor" has gotten me...

    So when I go to delete that action (because I could not edit it) it added it on the bottom of the "event list editor"...However, it showed it as in the same order as before I deleted it (as number second) in the "event editor".
    I incorrectly assumed that the columns as you go left to right was the order of execution in the event list editor. I really need to learn to read that thing, I hardly ever go in there, I use the "event editor" only and it got me good.

    Is that a feature that can be addressed? I wouldn't call it a bug per se, but the two should somehow be in sync, and / or show the order of the event you are looking at.
    For example, if you see attached pic, the numbers indicate to you that "hey, there are 3 other lines executing before this".
    event editor.png
    Good suggestion and would help right?

  8. #18
    Clicker Fusion 2.5

    Join Date
    Aug 2014
    Location
    Hawaii
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Gar, great tip!

  9. #19
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    I agree with you wiggy, the event editor does little to show the order in which events are executed,
    something like that would be handy and probably not so complex to do.

    I -almost- always use just the event list editor, I tend to code many events in single conditions,
    it's a little buggy sometimes (scrolling all to bottom, not copy-pasting group of events and if you cut you are lost ) but event order has a key importance

    You can also double-click a cell in the event editor and see the actions order only for that condition, as a "hybrid" solution.

  10. #20
    Clicker Fusion 2.5

    Join Date
    Aug 2014
    Location
    Hawaii
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Very cool tip for the double click, I'll be using that for sure as well.

    I really appreciate you and mochiban's tips, this really helped me understand a lot and move forward with learning Fusion to eventually start making my own games.

Page 2 of 3 FirstFirst 1 2 3 LastLast

Similar Threads

  1. Changing the brightness and contrast of active object?
    By J3sseM in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 12th June 2013, 10:07 PM
  2. Platformer Deceleration bug with changing controls
    By retsea in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 16th March 2011, 03:27 PM
  3. Changing controls
    By delta9857 in forum The Games Factory 2 - Technical Support
    Replies: 4
    Last Post: 8th November 2010, 04:56 AM
  4. Beta 4: Dynamically changing controls
    By BHGames in forum iOS Export Module Version 2.0
    Replies: 6
    Last Post: 4th November 2010, 09:59 PM
  5. Changing active object direction (???)
    By JohnC in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 19th January 2008, 11:58 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
  •