Temporary Variables: Difference between revisions

From PenguinMod Wiki
Jump to navigation Jump to search
Content added Content deleted
No edit summary
(Added article links and removed the spaces after each block)
 
(9 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Extension|extension_img=Tempvars.png|extension_desc=Create variables for use in one block stack. Useful to not clutter the variable list with variables you only use once.}}
{{Extension|extension_img=TemporaryVariables.png|extension_desc=Create variables for use in one block stack. Useful to not clutter the variable list with variables you only use once.}}


Temporary Variables is an extension for handling with temporary variables (or local variable) which can only be used in the block stack.
'''Temporary Variables''' is an extension for handling with temporary variables (or local variable) which can only be used in the block stack.


== Blocks ==
== Blocks ==
the following images are made with https://scratchblocks.github.io/ and https://en.scratch-wiki.info/wiki/Block_Plugin/Syntax
the following images are made with https://scratchblocks.github.io/ and https://en.scratch-wiki.info/wiki/Block_Plugin/Syntax


[[File:Set Variable to Value.svg|frameless]] Set the temporary variable to a value. Can also be used for defining. [[Set (variable) to (value)|page here]]
[[set () to () (Temporary Variables)|<sb>set [Variable] to (1)::#0869c2</sb>]] Set the temporary variable to a value. Can also be used for defining.


[[File:Change variable by 1.svg|frameless]] Change the temporary variable by a number.
[[change () by () (Temporary Variables)|<sb>change [Variable] by (1)::#0869c2</sb>]] Change the temporary variable by a number.


[[File:Get variable.svg|frameless]] Get the value of the temporary variable.
[[get () (Temporary Variables)|<sb>(get [Variable]:: #0869c2)</sb>]] Get the value of the temporary variable.


[[File:Delete variable.svg|frameless]] Delete the temporary variable.
[[Delete () (Temporary Variables)|<sb>delete [Variable]:: #0869c2</sb]] Delete the temporary variable.


[[File:Delete all variables.svg|frameless]] Deletes every temporary variable.
[[delete all variables|<sb>delete all variables:: #0869c2</sb>]] Deletes every temporary variable.


[[File:Variable exists?.svg|frameless]] Checks if the temporary variable exists.
[[variable () exists?|<sb><variable [Variable] exists?:: #0869c2></sb>]] Checks if the temporary variable exists.


[[File:Current variable.svg|frameless]] returns a list with every temporary variables. (will not include the value of those variables)
[[current variables|<sb>(current variables :: #0869c2)</sb>]] returns a list with every temporary variables. (will not include the value of those variables)


<scratchblocks>for each [Variable] in (10) {
[[File:For each variable in 10.svg|frameless]] loops for the specified amount of time with the temporary variables incrementing every loop. Can also be used for defining.

[[Category:Extensions]]
} :: #0869c2</scratchblocks> [[for each () in ()|loops for the specified amount of time with the temporary variables incrementing every loop]]. Can also be used for defining.
{{ExtensionsNav}}

Latest revision as of 16:36, 3 July 2024

Temporary Variables
Caption
Description Create variables for use in one block stack. Useful to not clutter the variable list with variables you only use once.
Link fortnite.com
Added fortnite...

Temporary Variables is an extension for handling with temporary variables (or local variable) which can only be used in the block stack.

Blocks

the following images are made with https://scratchblocks.github.io/ and https://en.scratch-wiki.info/wiki/Block_Plugin/Syntax

set [Variable] to (1)::#0869c2 Set the temporary variable to a value. Can also be used for defining.

change [Variable] by (1)::#0869c2 Change the temporary variable by a number.

(get [Variable]:: #0869c2) Get the value of the temporary variable.

delete [Variable]:: #0869c2</sb]] Delete the temporary variable. [[delete all variables|<sb>delete all variables:: #0869c2 Deletes every temporary variable.

<variable [Variable] exists?:: #0869c2> Checks if the temporary variable exists.

(current variables :: #0869c2) returns a list with every temporary variables. (will not include the value of those variables)

for each [Variable] in (10) {

} :: #0869c2

loops for the specified amount of time with the temporary variables incrementing every loop. Can also be used for defining.

ve Extension Navigation
Vanilla Music  · Pen  · Animated Text^  · Video Sensing  · Text to Speech  · Translate  · Makey Makey  · micro:bit  · LEGO MINDSTORMS EV3  · LEGO BOOST  · LEGO Education WeDo 2.0  · Go Direct Force & Acceleration
TurboWarp Files  · Physics  · Clones+  · Skins  · HTTP  · CloudLink  · McUtils  · GamePad  · Clipping and Blending  · Pointer Lock  · Mouse Cursor  · TurboWarp Blocks
PenguinMod Stage Camera  · Sound Systems  · Sound Waves  · Motion  · Events  · Control  · Sensing  · Operators  · JSON  · Custom Styles  · Tweening  · Tailgating  · Tile Grids  · Canvas Effects  · Multiple Timers  · Temporary Variables  · Runtime Modifications  · Font Manager  · Storage  · CloudLink  · Scripts  · Pang API  · 3D Math  · Extra Mathematics  · Random Utilities  · LZ Compress  · Prism  · Odd Messages  · PenguinGPT  · HTML iframe Elements  · Color Picker  · Colors  · All Menus  · Labels  · Perlin Noise  · CATS  · Printing  · Scratch Authentication  · JavaScript  · Easy Save*  · XML*  · Debugging*  · 3D Extension*  · 3D Physics*  · 3D Virtual Reality*  · Interfaces*  · Packager Applications*  · Inline Blocks*  · Pathfinding*  · Animation*  · Virtual Reality*  · PenguinMod Extra Extensions
Former Files  · Clone Communication  · PenguinMod Permissions  · Website Request Blocks  · OOP  · HTML Canvas  · Unite  · Advanced Text*
April Fools Test Extension  · Christmas  · an amazing extension  · Epic utilities  · image blocks  · fire in the hole  · the doo doo extension
Key
*: Work in progress or never released  · ^: Scratch Lab