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! :)
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.
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)
2 Attachment(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!
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.
Quote:
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