Move () steps: Difference between revisions

From PenguinMod Wiki
Move () steps
Jump to navigation Jump to search
Content added Content deleted
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Needs Images}}
{{Needs Images}}
{{Infobox Block
{{Infobox Block
|block_img =Move blank steps.png|thumb|block_type = Stack Block
|thumb|block_type = Stack Block
|category = [[Motion]]
|category = [[Motion]]
|title = move () steps
|title = move () steps
|block_name=move () steps}}
}}
The '''move () steps''' block is a Stack block and a [[Motion]] block. When used, it would move the sprite in a specified amount of steps to the direction the sprite's facing.
The '''move () steps''' block is a Stack block and a [[Motion]] block. When used, it would move the sprite in a specified amount of steps to the direction the sprite's facing.


Line 11: Line 11:
There are two ways to make this block:
There are two ways to make this block:


* <scratchblocks>move back ((-1) * (...)) steps::motion</scratchblocks>
* [[File:Workaround 2.png|500px]]
* <scratchblocks>go to x: ((x position) + (([sin v] of (direction)) * (steps))) y: ((y position) + (([cos v] of (direction)) * (steps)))</scratchblocks>
* [[File:Workafround.png|500px]]
{{DISPLAYTITLE:move () steps}}
{{DISPLAYTITLE:move () steps}}
[[Category:Stack Blocks]]
[[Category:Stack Blocks]]

Latest revision as of 09:38, 17 June 2024

Images needed

This article needs images or better quality images. You can help PenguinMod Wiki by adding the images or uploading them.

move () steps
move () steps
Caption
Block Type Stack Block
Category / Extension Motion
Status Who tf uses status

The move () steps block is a Stack block and a Motion block. When used, it would move the sprite in a specified amount of steps to the direction the sprite's facing.

This block can be useful if you want the sprite to move to where ever you want without having to make complicated methods.

Workaround

There are two ways to make this block:

  • move back ((-1) * (...)) steps::motion
  • go to x: ((x position) + (([sin v] of (direction)) * (steps))) y: ((y position) + (([cos v] of (direction)) * (steps)))