Icon

Draw Sprite along Path

ticedev

You must be logged in to obtain assets

Description

HTML5 DEMO:
http://tice.bplaced.net/gamemaker/DrawPathSprite/index.html

Info:
With this script you'll be able to draw a Sprite along a Path with

Usage:

  1. Create a new Path (with smoothing enabled)
  2. Create a new Sprite you want to draw along the path.
  3. Call the script with your desired arguments.

Script Arguments:

  • path = path index
  • x = offset x
  • y = offset y
  • width = thickness of the path
  • sprite = sprite to use
  • spriteIndex = image index of the given sprite
  • spriteScaleX = x scale for the sprite
  • spriteScaleY = y scale for the sprite
  • color = color of the sprite
  • alpha = alpha of the sprite
  • segments = amount of segments between two points on the path (more = smoother)
  • tiled = should the sprite be tiled over the path (0 = no tiling, 1 = tiling)

Script call:

draw_path_sprite(path, x, y, width, sprite, spriteIndex, spriteScaleX, spriteScaleY, color, alpha, segments);

Update 1.0.1:
- spriteRepeatX & spriteRepeatY are now a spriteScaleX & spriteScaleY

Update 1.0.2:
- now works correctly with non closed paths
- segments is now the smoothness between two points

Update 1.0.3:
- added tiled argument

End User Licence Agreement (EULA).

Age Rating: 4+

Version

GMS1 - Version 1.0.3. Published April 1, 2015

Loading, please wait

Package contents

Loading, please wait

What is the issue?

Loading, please wait