I want to know what a snippet clearly means. What does it stand for ? Can we use it ?
Snippet is a programming term for a small region of re-usable source code, machine code, or text. Ordinarily, these are formally-defined operative units to incorporate into larger programming modules. Snippets are often used to clarify the meaning of an otherwise "cluttered" function, or to minimize the use of repeated code that is common to other functions. The snippets themselves may be either literal text, or written in a simple template language to allow substitutions, such as variable names. Snippets are a small-scale form of copy and paste programming. Snippet management is a feature of some text editors, program source code editors, IDEs, and related software. It allows the user to persist and use snippets in the course of routine edit operations.
{$CLEO .cs}
THREAD "AIM_EXPLOSION"
0662: NOP "www.youtube.com/OpcodeXe"
0662: NOP "www.ugbase.eu"
:START
wait 10
if
0AB0: KEY_PRESSING: 2 // RIGHT MOUSE BUTTON - AIMING
jf @START
GOSUB @GET_AIMING_POS // RETURNS AIMING AT POSITION TO: 0@ 1@ 2@
020C: create_explosion_with_radius 3 at 0@ 1@ 2@
Jump @START
:GET_AIMING_POS // PASTE THIS AT THE END OF THE SCRIPT
Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
0A9F: 5@ = current_thread_pointer
5@ += 80
0A8E: 6@ = 5@ + 12 // int
0AA6: call_method 5327216 11989032 num_params 6 pop 0 6@ 5@ 3@ 2@ 1@ 4@
if
86BD: not no_obstacles_between 1@ 2@ 3@ and 8@ 9@ 10@ solid 1 car 1 actor 0 object 1 particle 0
else_jump @ADD
jump @END_POS
:ADD
4@ += 1.0
if
4@ > 250.0
else_jump @GET_AIMING_POS
:END_POS
0@ = 0.0
1@ = 0.0
2@ = 0.0
005B: 0@ += 8@ // (float)
005B: 1@ += 9@ // (float)
005B: 2@ += 10@ // (float)
4@ = 0.0 // RESET THE AIM RADIUS
return