Declare a New Custom Variable with const-end


let's jump directly to the example;
CODE

when you compile the Script, automatically Sanny builder will going to replace each custom variable (NEW_ACTOR) for the variable 15@.
with this, we save time. Because, in case we want to replace the variable 15@ for 10@.
then we don't have to change the variable throughout the script.
we only need to declare inside const - end that NEW_ACTOR is equal to 10@

for example;
we can also store a File Path, and it works in the same way as above.

this works for everything.
we can store coords;

const
        COORD_X = 2@
        COORD_Y = 3@
        COORD_Z = 4@
end
04C4: store_coords_to COORD_X COORD_Y COORD_Z from_actor 215@ with_offset 1.0 3.0 1.0


we can store animations;
const
    IFP_PACKAGE         = "LOWRIDER"
        ANIM1_PACKAGE   = "LRGIRL_IDLELOOP"  
end
0812: AS_actor -1 perform_animation ANIM1_PACKAGE IFP IFP_PACKAGE framedelta 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time -1  // versionB


and so on....
;)

Comentarios