Spheres, icons and markers
First: what are spheres, icons and markers? Icons are the graphics on the radar, markers are the arrows above the heads of the actors or cars. Spheres are the small, red rounds, which for example occur when you are starting the mission.
Create a sphere/icon?
You can create a icon and sphere with 1 command, you can also only create a sphere or an icon. There are icons you will see always, like mission letters, and icons which only occur when you are in the neighbourhood, like ammu-nations. I will explain all of them.
> 03BC: 10@ = create_sphere_at 2488.5601 -1666.84 13.38 radius 5.0
This is the code for only a sphere. The 10@ is the variable (handle) of the sphere, which you can use later on when you want to do something with the sphere (like destroy it). Then there are x, y and z coords. Finally there is a radius. 1.0 is small, 10.0 is big. Spheres in which you can start a mission, are about size 1.0.
Icon and Sphere that are always visible
> 02A7: $ICON_SPHERE_CJ = create_icon_marker_and_sphere 15 at 2488.5601 -1666.84 13.38
15 is the number of the icon you want to display. You can find it in Help > Contents > SCM Documentation > GTA SA > Radar icons. Then you have the 3 coords: x, y and z. $ICON_SPHERE_CJ is the variable which you can use to delete the sphere and the marker
Icon (without sphere) that is always visible
> 02A8: $marker03 = create_marker 23 at 658.0068 -1866.3127 4.4537
This is the code for a icon marker without sphere, so you will see it on the radar, but you won't see a red round on that place. First the handle of the marker, the 23 says which icon it has to be. You can look it up in the help files, like said above. In this case, 23 is the Loco Syndicate icon. Finally you have to add the coords.
Icon and Sphere that are only visible when you are in the neighbourhood
> 0570: $icon_en_sphere = create_asset_radar_marker_with_icon 36 at 1837.3643 -1974.4963 12.5469
Like you can see, there are only 2 things changed. The code of the opcode (02A7 > 0570), and the command itself. But the idea is the same: 36 is the number of the icon which you can look up in the help-file list and the coords.
Icon that is only visible when you are in the neighbourhood
> 04CE: $icon = create_icon_marker_without_sphere 12 at 2447.3643 -1974.4963 12.5469
I don't think explanation is necessary anymore, by now.
Markers are arrows above an object, an actor or a car. They are also marked (with a square) on the radar. There are all kind of markers. You have to use one of the following opcodes:
> 0187: $m1 = create_marker_above_actor 10@
0186: $m2 = create_marker_above_car $greenwood
03DC: $m3 = create_marker_above_pickup $weapon
0188: $m4 = create_marker_above_object $object
The first one is to create a marker above an actor, the second one above a car, the third above a pickup and the fourth above an object.
These are different opcodes! Look at the code of the opcode (like 0187), it is different than the others! The first variable is the handle/name of the marker, the second is the handle of the actor/car/pickup or object.
You can do all kind of things with the marker, like make it in different colors:
0165: set_marker $m1 color_to 1
List of colors:
2= light blue
4= light yellow
Finally you have to de destroy the marker/sphere/icon, so that you can't see it any more. You can use the following opcodes for that:
> 0164: disable_marker $m1
> 03BD: destroy_sphere 1@
For example: an arrow on a Greenwood:
> //Load models
0247: load_model #GREENWOO
8248: not model #GREENWOO available
004D: jump_if_false @MODEL_SPAWN
0001: wait 0 ms
0002: jump @MODEL_LOAD
00A5: $greenwood = create_car #GREENWOO at 2458.2483 -1659.0264 13.3047
0186: $m1 = create_marker_above_car $greenwood
wait 5000 ms
0249: release_model #GREENWOO
So there spawns a Greenwood, with an arrow. After 5000 ms (5 seconds), the arrow will disappear.
The full code in a stripped file
When you worked through all of these tutorials sofar, you can make a short, easy mission! We will do that in the next tutorial!