Hey all!
I'm hoping someone can help me with an issue I'm having. I'll try to describe my issue, and I'll post a .capx below.
I'm working on a gamejam, and my game is acting kind of buggy, and I'm hoping someone can help me pinpoint the problem. I've been at it for two days, and I'm going nuts trying to get this to work the way I want to.
The player is a were-banana, and can exist in two states: transformed or not transformed. The player changes between states by pressing Space.
Basically, when the player gets close enough to a strawberry, it turns to face the banana, and the strawberry's field of view is supposed to be mirrored when the strawberry is mirrored, and not mirrored when the strawberry is not mirrored.
The issue that's happening is that if the player walks across the screen in an untransformed state all the way to the right, and then comes back to the left, the third strawberry's field of view gets wonky, and won't mirror properly.
I think it has something to do with the "serial" instance values between the Strawberry and StrawberrySight objects. Originally I had them set as numbers, and if the strawberries weren't killed in order of smallest to greatest value, their field of views would get skewed and not act the way I wanted them to. I tried to change them to strings, but I'm pretty sure they still have a certain "least to greatest" value, because they're still wonky, and occasionally don't mirror properly.
Also, if you beckon a strawberry so it sees it's fallen friend, it will run to the fallen friend and cry. If you leave the crying strawberry and walk past the remaining strawberries, their fields of view don't mirror when they should either.
Anyhow, this: https://www.dropbox.com/s/ctlurxsr0cwav37/Were-Banana!.capx.backup1 is the .capx for where I'm at now. If anyone can help me figure this out, I'd greatly appreciate it.
I have my events organized in groups and labels above what the functions are supposed to do to the best of my ability. This is my second game, so I'm sorry if it's a little messy.
The controls for the banana are:
Arrow keys to move
D while untransformed to wave at a strawberry (makes them either follow or stop following you if they see you and you are facing them)
D while transformed to attack with your hand (should kill the strawberry)
D while transformed and jumping to kick (also kills strawberry, but I have to make the hitbox easier)
The banana can only jump while transformed, and will move faster while transformed as well.
Thank you so much!!