Hello, in this tutorial I'll show you how to create a pickup CONSERVATION.
This manual is no such knowledge comes only with experience ,but who are too lazy to wait
thanks to detail So ,we will do our external script with using Sanny Builder 3 ,and
in the future, just SB (download can SANNYBUILDER.COM)
Now open it up and click the create new File (If you open it for the first time, you will need to configure it ,specify the main games directory etc.)
and see the empty lines which we have to fill opcodes (special commands that perceives the game)
Once we write an external script that first of all is going to set the file format of the future .
This is done Directive {$CLEO .cs} (it indicates that the compiled file will get the expansion of custom script that reduction is CS)
Write in the first line of it (note on the same line one team i.e. one opcode)
{$CLEO .cs}
Then we need to load into memory game the save icon ,it is done in teams
model.load(#model ) //where it is the model to write a model in this case #PICKUPSAVE ,but note this file has no header so write
model.load(1277) // 1277 this object id #so PICKUPSAVEE. write the numerical number of this object.
But this opcode we only discovered the model that will upload so you need to write the next line
038B: load_requested_models // but these code we uploaded the model in memory. Point that you can declare more models (each announcement on a new line !) but will need to download them only once ,so this opcode is written once ,and know that" //" is the beginning of a comment and compiler (it thing that all of our opcodes translates into an intuitive game language ) does not pay attention to him ,because they serve convenient orientation in the script, a comment is something like notes on your desktop
Then you can check the model of the workload otherwise if the model does not loaded and we have something do to happen departure To begin to make a label
:NONAME_10 // this is the tag to create write a colon and then the name of the label
Label scripters create the most often for inspections, as in our case.
After the label command write this
wait 0 ms //this delay 0 Milli seconds i.e delay, there is but write this command after the labels required (if not write, then wait for the departure) and sometimes need to write to wait 100 ms ie give delay that game waiting. Then write
if and // is announcing the number of conditions we have two of them so write and if (the script will not run farther until all the conditions are not positive), but if the condition that one need to write a simple if and when conditions well, let's say three to further run a script to be executed at least one of them then write if or.
So, next we write that we need to check and verify we will object on the workload and the player on the existence of
to do this, write
model.available(1277)//it is checking on the workload model
0256: player $PLAYER_CHAR defined //check for there is a player
else_jump @noname_10 //so, it would sound like this :if the model upload player and there is a script execution will go on if not then leap on the label
@noname_10 and start re-execute commands model.available(1277) and the player $PLAYER_CHAR defined shorter this loop will occur until the condition model is upload and the player there is not to be true.
Now that we have got :
{$CLEO .cs}
wait 100 //delay for greater security
model.load(1277)
038B: load_requested_models
:NONAME_10
wait 0 ms
if and
0256: the player $PLAYER_CHAR defined
model.available(1277)
else_jump @noname_10
AND PROCEED TO FURTHER STUDY ...
Once we have downloaded and tested the model now you can create
this is done by a team of
0213: $BUY_ASSET_PICKUPS = create_pickup 1277 type 15 at 1182.986-1324.592
13.5783 // write in one line
1277 is a model of created object (pickup conservation)
$BUY_ASSET_PICKUPS is a global variable(not desirable to apply because this may cause an error ,BUT this variable is an exception!) you will wrote the model i.e. in a further step, we can not write 1277 and instead write $BUY_ASSET_PICKUPS
in many cases, it will be very convenient
1182.986, -1324.592, 13.5783 are the coordinates of the created pickup .their can be found using any of teleporter and sb has a built-in editor coordinates(tools/tools /editor coordinate - GTA should be included
there's also a checkbox at the bottom of 1.1 if you click it you will get a teleporter for game version 1.1)
Type is the type of the truck, there are the following types:
1 - for the money is recovered almost immediately
2 - free, regeneration 30 minutes of playing time, it is necessary to depart close
3 - free, disposable
9,11 - bomb
15 - regenerated 6 hours of playing time or 6 minutes
we have chosen the type 15 because the game after saving passes 6 hours
well here we have a pickup savegames, BUT until non-working.
To make it complete ,you need to add another check
on pickup .
Create another label to the example with the name of the
:noname_11
wait 100 // write delay otherwise could fly
if //announce number of conditions, i.e it one
0214: pickup $BUY_ASSET_PICKUPS[0] picked_up //check for pickup
else_jump @noname_11//if a player raised pickup t-- condition is not fulfilled then the execution of the script starts with the tag @noname_11 and this will be repeated until the condition is not satisfied i.e pickup will be raised
If all has passed successfully you need to display the save screen. Doing this team
03D8: show_save_screen //this is the menu where you save
well, the memory game is not contaminate need to make sure to remove the pickup. Doing so
model.Destroy( $BUY_ASSET_PICKUPS)//I hope you have not forgotten that $BUY_ASSET_PICKUPS this is the model of 1277
0215: destroy_pickup $BUY_ASSET_PICKUPS//well, and the destruction of a pickup truck
well, as if to once again continue the start re-execution of a script tag @noname_10 i.e write
jump @noname_10
HERE is the CODE which should you get :
{$CLEO .cs}
wait 100
0247: load_model 1277
038B: load_requested_models
:NONAME_10
wait 0
00D6: if and
0248: model 1277 available
0256: player $PLAYER_CHAR defined
004D: jump_if_false @NONAME_10
0213: $BUY_ASSET_PICKUPS = create_pickup 1277 type 15 at 1182.986-1324.592 13.5783
:noname_11
wait 100
if
0214: pickup $BUY_ASSET_PICKUPS[0] picked_up
else_jump @noname_11
00A1: put_actor $PLAYER_ACTOR at 1187.1106-1323.4843 13.559//Early I wrote but you better this opcode write to the player does not remained on the spot savegames and always raised pickup (this opcode teleports)and remember that // is a comment .
03D8: show_save_screen
model.Destroy(1277)
0215: destroy_pickup $BUY_ASSET_PICKUPS
jump @noname_10
Compare this code and that which we have if you have something not so fix. When all checked press cherished the compile button(at the top, reminiscent of green running man)
Enter any name for your File .
Save this script in the folder Cleo (is a must in your game directory)
Start the game and enjoy YOUR creation.
Good luck in shell scripts ! and read the manual that comes with Sanny Builder...
(Useful for brain)