I just started to learn Construct 2 and having a problem
I create a platform sprite and I want it to aim toward mouse angle, but limited (not 360 degree)...and I want it to mirrored instead of rotated if I aim the mouse behind the character
Well maybe it's difficult to understand what I write so I put the capx here, hopefully there's someone can help me with this
Thanks before <img src="smileys/smiley4.gif" border="0" align="middle" />
r4dicaldreamer - here you go, i left some notes in the capx. tag me with wretchedshark if you need any more help <img src="smileys/smiley1.gif" border="0" align="middle">
aiming platformer capx (r117)
Develop games in your browser. Powerful, performant & highly capable.
thanks a lot wretchedshark
I'll check it out once I got home
wretchedshark - it's working, thanks for your help :)
but there's some glitch on mirroring the head and gun, it will start pointing the opposite direction before back to normal...I wonder how to fix this :\
r4dicaldreamer - when does this occur? right when you look left or right, or when the mouse is near the center point of the player or?
wretchedshark - it occurs when the head n gun mirrored by mouse aim
so let's say I'm aiming to the top left of the screen, and I drag the mouse from there to top right, slowly. The glitch occurs when the character reach the limit angle and then mirroring...try it
r4dicaldreamer - i believe it is due to the way the range is set up, if you're past the range when you switch over to the other side is just mirrors that angle.
wretchedshark - oh I see...so I can't aim my mouse too far from the object? It's kinda problem though, because the object moves freely and you can't control your mouse to always near it. Is it any way to deal with this? I'll also try to fix this though, just in case you find the solution first :)
thanks by the way
r4dicaldreamer - i haven't really thought of one yet, try disabling the lines that limit the range and see if that fixes it. if so you could try adding more lines for when the mouse is out of range and have it just set the angle while it's doing that and i will have a look later <img src="smileys/smiley1.gif" border="0" align="middle" />
wretchedshark - I've tried to make the angle fixed when the debugAngle is beyond the rotation limit, but still didn't work
I got an idea to make the new sprite for head and gun that already mirrored, so maybe if I just call the other sprite instead of mirroring the original one, there will be no glitch
or I can put it in the animation on the sprite, an call it to replace the mirror action
I'll let you know about this and upload the capx later...I forgot to save the last experiment I did, with fixed angle :(
r4dicaldreamer - i updated the capx, does this work for you? (the gun was not fixed for reference of the new head movement)
wretchedshark - I fail when I made an animation that mirrored the sprite. It still glicthy
I'll try your new capx and let you know about it
thanks a lot, pal :)
r4dicaldreamer finally have you find a fix regarding your problem of angle ?