08.11.2012 Views

Designing Games with Game Maker - YoYo Games

Designing Games with Game Maker - YoYo Games

Designing Games with Game Maker - YoYo Games

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

place (1-10). This can be used to draw your own highscore list.<br />

highscore_name(place) Returns the name of the person on the given<br />

place (1-10).<br />

draw_highscore(x1,y1,x2,y2) Draws the highscore table in the room in<br />

the indicated box, using the current font.<br />

Resources<br />

In <strong>Game</strong> <strong>Maker</strong> you can define various types of resources, like sprites, sounds, fonts, objects,<br />

etc. In this chapter you will find a number of functions that give information about the<br />

resources. In the next chapter you find information on how to modify and create resources on<br />

the fly.<br />

Sprites<br />

The following functions will give you information about a sprite:<br />

sprite_exists(ind) Returns whether a sprite <strong>with</strong> the given index exists.<br />

sprite_get_name(ind) Returns the name of the sprite <strong>with</strong> the given<br />

index.<br />

sprite_get_number(ind) Returns the number of subimages of the sprite<br />

<strong>with</strong> the given index.<br />

sprite_get_width(ind) Returns the width of the sprite <strong>with</strong> the given<br />

index.<br />

sprite_get_height(ind) Returns the height of the sprite <strong>with</strong> the given<br />

index.<br />

sprite_get_transparent(ind) Returns whether the sprite <strong>with</strong> the given<br />

index is transparent.<br />

sprite_get_smooth(ind) Returns whether the sprite <strong>with</strong> the given index<br />

has smoothed edges.<br />

sprite_get_preload(ind) Returns whether the sprite <strong>with</strong> the given index<br />

must be preloaded.<br />

sprite_get_xoffset(ind) Returns the x-offset of the sprite <strong>with</strong> the given<br />

index.<br />

sprite_get_yoffset(ind) Returns the y-offset of the sprite <strong>with</strong> the given<br />

index.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!