Game maker sprite mask


















Luckely Game Maker has a built in system for this. These are the masks. If you add both the first image to your game and the black image to your game and set them as mentioned below:. Masks are also very useful when using animated sprites. Since the image changes every step the area the sprite takes in also changes every step.

So it could be that during an animation in one frame you are walking past a wall while the next moment you are inside the wall. This makes that you suddenly stand still and are stuck in a wall. Luckily when using masks this will not happen since masks do not change for your object. Argument Description ind The index of the sprite to set the bounding box of. Whether to create collision masks for each sub-image of the sprite true , or one mask for all false.

Back: Sprite Manipulation. A precise collision mask, where the mask will conform to the non-transparent pixels of the sprite, based on the tolerance value given see below. Whether to create collision masks for each sub-image of the sprite true , or one mask for all false. More info See in Glossary itself will not be visible in scene A Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level.

In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info See in Glossary , only the resulting interactions with Sprites. Sprite Masks are always in effect. Quite often we want the mask to only affect a particular sprite or a group of sprites.



0コメント

  • 1000 / 1000