obj/Capturing/Stylus
icon = 'Stylus.dmi';
icon_state = "Stylus";
screen_loc = "1,1"
turf
icon = 'trf.dmi';
client
MouseUpdate(tx, px, ty, py)
var/mob/A = src.mob;
A.MyStylus.screen_loc = "[tx]:[px - 16],[ty]:[py - 16]"
mob
Login()
..()
track_mouse()
var
obj/Capturing/Stylus/MyStylus;
client/MouseDown() {
var/obj/Capturing/Stylus/Stylus = new();
mob.MyStylus = Stylus;
src.screen += Stylus;
}
What i'm missing is the line drawing (Which in my oppinion is a little hard depending on the direction.)
Something like this: http://youtu.be/eFbqywlRZa8?t=3m22s (How line is begin drawed... and how the system checks that pokemon is inside the "circle", i've been looking and seems like this is done by some maths.)
Thanks.
For circle thing:
1. Calculate center of pokemon (or define one manually);
2. Calculate center of drawn circle; to simplify process use center of AABB;
3. If center of pokemon is closer to the center of the circle than the closest point of the circle to the center of the circle then pokemon is inside circle.