Difference between revisions of "Category:Mission Scripting"

From GTAMods Wiki
Jump to navigation Jump to search
 
Line 1: Line 1:
== Mission Scripting ==
+
Articles dealing with mission scripting, the main.scm file and related software.
 
 
== Introduction ==
 
 
 
The original Mission Script looked something like this (taken from vice city debug.sc file):
 
 
 
IF IS_BUTTON_PRESSED PAD2 RIGHTSHOULDER1
 
AND flag_create_car = 1
 
AND button_press_flag = 0
 
IF IS_CAR_DEAD magic_car
 
DELETE_CAR magic_car
 
ELSE
 
IF NOT IS_PLAYER_IN_CAR player magic_car
 
DELETE_CAR magic_car
 
ELSE
 
MARK_CAR_AS_NO_LONGER_NEEDED magic_car
 
ENDIF
 
ENDIF
 
flag_create_car = 0
 
initial_car_selected = 0
 
button_press_flag = 1
 
ENDIF
 
 
 
Easy to read and understand, and fairly basic, so anyone with an idea of basic coding (or even english) can understand it.  However, very little code came with the game like that, the majority of the mission script comes in a file called main.scm (although in San Andreas there ar alternate mains and external scripts, but they all follow the same basic format - hex codes).  Example, for the code:
 
 
 
IF IS_CAR_DEAD magic_car
 
DELETE_CAR magic_car
 
 
 
The equivalent in the main.scm would look something like this:
 
 
 
D6 00 04 00 19 01 02 45 0E 4D 00 01 FE 3D 87 02 A6 00 02 45 0E
 
 
 
As you can see, this is nowhere near as easy to understand (infact, its pretty hard to understand, even for someone who knows the SCM format), the original code (which is easy for us to understand)
 

Revision as of 21:20, 5 September 2005

Articles dealing with mission scripting, the main.scm file and related software.

Subcategories

This category has only the following subcategory.