After a quick peruse of the forums I haven't been able to work this out...
I'm using a 360 degree aiming engine I found on here (can't remember where) using the Advanced Direction Object. The arm that points towards the mouse/reticule has its hotspot over the shoulder, and it's action point a few pixels above and to the right/left of the hotspot in the barrel of the gun (the exact location varies from weapon sprite to weapon sprite). My problem at the moment is one of two things: With this method, the bullets are offset from the reticule (Due to the difference between the hotspot and action point locations, I'm guessing). I can get around this by changing the x and y values that the ADO looks at from the hotspot to the action point, but this causes the arm sprite to jitter around like crazy when you get too close to it with the mouse...
Anyone got any help/fixes?
Cheers.
There are 10 types of people in the world: Those who understand binary and those who don't.
It's sort of a bug, and like most bugs, it's a bit hard to find out where the source of the problem is without the code
One quick fix would be to disable the arm sprite from aiming when it's too close to the mouse. Just add a condition that the distance has to a minimum distance, large enough to prevent the jittering.
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.
Another point: I'll be interested to see if other people can download from that link. It should allow direct downloading but I've never tried it outside of Byond before...
There are 10 types of people in the world: Those who understand binary and those who don't.
Hmm..can't see a quick fix to it, I'll try to look at it in 2 weeks though, if nobody else does.
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.
In the second event -> First action -> set Player Arm's Angle to ...
Change The first coordinates to the Player Arm's hotspot instead of it's action point.
The bullet wheren't offset, but they become this way. Perhaps just change the Player Arm's action point & center the bullet hotspot?
I said in my first post that I'd tried aiming from the hotspot rather than the action point. That's what causes the bullets to miss the reticule since the action point is in a different location to the action point. Thanks for the feedback, though. Your second point has given me an idea!
There are 10 types of people in the world: Those who understand binary and those who don't.
Hum... Sorry, I obviously didn't read everything .
Solution: First, use the hotspot for the arm rotation, then, in the same event (the second), Replace the Yellow bar's(simply named "Active") actions by these:
______________________________________________
[Just copy/paste into the expression editor]
It shouldn't. The mouse and the reticule are never going to be visible at the same time so it shouldn't be too noticeable. Now that annoyance is out of the way I can actually start progressing with this little project...
There are 10 types of people in the world: Those who understand binary and those who don't.