• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GML Cool program that lets you track points on your sprite, and also im a noob!

E

entegrade

Guest
hey all, i came accross this program called thundertracker that lets you track points in your sprite and turn that data into arrays

i wanna use this to for a customization system (hats and helmets etc) in my game but i dont really understand the explanation they gave :c , and googling hasnt done me any good either. id just use draw sprite but thatd be so many more unneseccary sprites/frames since my character sprite moves. im also gonna have different playable characters with different animations too (but using the same helmets)

any idea on how this would be implemented in code? i appreciate all the help :)
 

DukeSoft

Member
If you really want this to fit properly, you should draw the animation for each part of clothing you have - you can then make the rest transparant, as long as the origin of the sprites match.

You can then draw 2 sprites using draw_sprite_ext - one with the regular sprite, and 1 over that with another sprite (but same image index / scaling).

That would be the easiest, and best looking way.
 

FrostyCat

Redemption Seeker
I saw the video, and within minutes of the 6:00 mark I knew what it's about on the most part. The author didn't do a very good job documenting the tool with that video, but you've got to be pretty deaf to his verbal and tonal cues to not have a rough idea of what he means.

You're supposed to copy out the generated GML fragments in the exported text files, replace the search&replace part with a prefix to avoid conflict between points, and save the result in the Create event of an object that implements the point tracking behaviour:
Code:
// TRACKER1
XPOSboyTRACKER1[0] = ...;
YPOSboyTRACKER1[0] = ...;
...
XPOSboyANGLEPOINT[0] = ...;
...
ANGLEboy[0] = ...;
...
Then draw at the supplied coordinate offsets along the lines of this:
Code:
draw_self();
draw_sprite_ext(hat, 0, x+XPOSboyTRACKER1[image_index]+XPOSboyANGLEPOINT[image_index], y+YPOSboyTRACKER1[image_index]+YPOSboyANGLEPOINT[image_index], 1, 1, ANGLEboy[image_index], c_white, 1);
Or for points without an angled component:
Code:
draw_self();
draw_sprite(hat, 0, x+XPOSboyTRACKER1[image_index], y+YPOSboyTRACKER1[image_index]);
 
Last edited:
Top