Difference between revisions of "Category:Mission Scripting"

From GTAMods Wiki
Jump to navigation Jump to search
 
(moved to Modifications category)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Mission Scripting ==
+
Category for tutorials and helpful articles dealing with mission scripting, the main.scm file and related software.
  
== Introduction ==
+
If you are new to mission scripting, you might want to have a look at the [[Mission Scripting (Overview)|general overview]] article.
  
The original Mission Script looked something like this (taken from vice city debug.sc file):
+
More technical articles about this subject can be found in the [[:Category:Mission Script|Mission Script Documentation]].
  
IF IS_BUTTON_PRESSED PAD2 RIGHTSHOULDER1
+
{{GTAF|480446|III Coding Directory}}, includes list of useful tutorials and topics
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:
+
[[Category:Modifications]]
 
 
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)
 

Latest revision as of 14:23, 20 May 2015

Category for tutorials and helpful articles dealing with mission scripting, the main.scm file and related software.

If you are new to mission scripting, you might want to have a look at the general overview article.

More technical articles about this subject can be found in the Mission Script Documentation.

GTA Net GTAForums: III Coding Directory, includes list of useful tutorials and topics

Subcategories

This category has only the following subcategory.