User Tag List

Results 1 to 6 of 6

Thread: Object Selection issues

  1. #1
    No Products Registered

    Join Date
    May 2008
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Object Selection issues

    EDIT - I updated the test file in a post further below. It's probably a better example that the one attached to this post.
    ---
    Uploading this so folks can give me feedback on the Object Selection issues I'm encountering.

    The file is a bit of a mess, but I deactivated most of the nonessential groups. Some groups activate when commanded, but currently the scripts are focused only on having 3 instanced NPCs correctly orient themselves to the player when he is in their field of view. Their field of view is a separate object being combined through Spread Value and Alterable Value sharing. IN this latest version I turned to trying to use fastloops via this article - http://www.clickteam.info/kb/start/index.php?showtopic=43 but still no luck.

    If I can get this one thing working correctly I should be able to utilize it throughout. Many thanks to Dines and others for their help and investigation.
    Attached files Attached files

  2. #2
    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: Object Selection issues

    Spread value 0 instead of 1 worked for some of it. I just don't completely understand what all the events are for (and don't try to tell me it's ok)

    Maybe you'd rather have an invisible object around the enemies. Thats what worked for me. Then what you do is at the start of the frame you spread a value in the enemy. Then you test to see if the enemy is overlapping the invisible object. if it is, change a value in the invisible object to the value of the enemy's invisible object. Then, when your player is overlapping the invisible object, test to see if the alterable value of an enemy is equal to an alterable value of the invisible object. If so, set direction... yadayadayada

    Hope this helps!

  3. #3
    No Products Registered

    Join Date
    May 2008
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Object Selection issues

    That's actually what I was doing originally. I have read and re-read so many articles on this my eyes are ready to bleed. I never tried the overlapping-object method because the Spread Value/Corresponding Alterable Value method seemed more appropriate. What happens when the Enemy detectors overlap another enemy and the player at the same time? I guess the matched Alt Values would eliminate multiple enemy events, but because things have been so messed up with so many checks and balances already, I wasn't too confident. I'll give it a try anyway.

    Question though - In half the articles on Spread Value, they say to place that Event in an "Always" thread. The other half say to place it in "Run at Frame Start". Which is correct? If it matters, I'm not dynamically creating the characters (at this point). Just Ctrl-copying the around the frame.

    All feedback helps, thank you a great deal for taking a look at it. I'm just glad folks will take the time to help, otherwise I'm completely lost at this point.

  4. #4
    No Products Registered

    Join Date
    Dec 2006
    Posts
    1,332
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Object Selection issues

    Quote Originally Posted by RickyRombo
    Maybe you'd rather have an invisible object around the enemies.
    Invisible objects as detectors = Bad

    They murder your frame rate in large applications. What you can do is use a formula to find the distance between the two objects, and if it is less than a certain value, perform the actions. And plus, if you need a customizable radius, you would have to change the circles for each part. And you don't have to check with collisions or deal with extra objects and positioning. The distance formula is relatively simple, or you can even just use an extension. And just as a reference:

    Distance formula: Sqr((X2-X1)pow 2+(Y2-Y1)pow 2)

  5. #5
    No Products Registered

    Join Date
    May 2008
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Object Selection issues

    Uploading yet one more test, where the NPCs base their reaction to player detection more on their "Sense" AltStrings (SeesPlayer, OnFloor, etc), instead of detector-overlap, which is what I was relying on in my earlier.
    This seems to be the best example I can get, because you can clearly see how they will react to the player in independent ways, yet not in the same way intended (one will see and follow the player, one will see the player, acknowledge him, and not move at all).

    Maddening!
    Attached files Attached files

  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: Object Selection issues

    Quote Originally Posted by Brandon
    Quote Originally Posted by RickyRombo
    Maybe you'd rather have an invisible object around the enemies.
    Invisible objects as detectors = Bad
    I get that, except I had this problem too and it was the only way I could get it to work.
    They murder your frame rate in large applications. What you can do is use a formula to find the distance between the two objects, and if it is less than a certain value, perform the actions. And plus, if you need a customizable radius, you would have to change the circles for each part. And you don't have to check with collisions or deal with extra objects and positioning. The distance formula is relatively simple, or you can even just use an extension. And just as a reference:

    Distance formula: Sqr((X2-X1)pow 2+(Y2-Y1)pow 2)
    The Advanced distance object also is object selective, so he'd still be stuck, unless he could fix it by rewriting it or something.

    EDIT: Although I never thought of using the distance formula

Similar Threads

  1. Adventures in Object Selection Issues [MFA INCLUDED]
    By pikzilla in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 2nd January 2013, 08:08 AM
  2. Create Object + Object Selection Revisited
    By Crash86 in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 22nd February 2011, 04:33 PM
  3. Problems with object selection
    By mobichan in forum SWF/Flash Export Module Version 2.0
    Replies: 14
    Last Post: 25th March 2010, 10:39 PM
  4. Object selection
    By pikzilla in forum Multimedia Fusion 2 - Technical Support
    Replies: 18
    Last Post: 2nd September 2009, 10:56 PM
  5. Object Selection
    By NG2 in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 13th March 2009, 02:41 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
  •