Hi, I'm a friend of Gtasbigfoot's.
The first External Script begins, were the last mission of the main.scm ends.
After compiling the main.scm, the External Scripts are in script.img. (This apply's to the original main.scm).
1: Find:
After you found this increase it by 1, so it becomes:
2: Go to the end of the define external script and place this:
3: We now move on to creating the threads starter; so we can start the extranal script.
Place this with the other create thread commands:
4: After we did this, search for:
Before this place the starter of the extranal script:
Of course, you should edit the starter, if needed, and replace X.Y.Z with coords.
5: Now, we have did this, you can go down to the last extranal script, and place yours:
Notes:
A external script is a thread too. So no going above 33@ like normal scripts, they are valued to 0@..to 33@ (32@, 33@ local timers).
In Mission Packs the game does not load the script.img, which means, external scripts, do not work. There is a patch which fixes this problem. Click!
The first External Script begins, were the last mission of the main.scm ends.
After compiling the main.scm, the External Scripts are in script.img. (This apply's to the original main.scm).
1: Find:
- Code:
DEFINE EXTERNAL_SCRIPTS 78
After you found this increase it by 1, so it becomes:
- Code:
DEFINE EXTERNAL_SCRIPTS 79
2: Go to the end of the define external script and place this:
- Code:
DEFINE SCRIPT demo AT @Demo
3: We now move on to creating the threads starter; so we can start the extranal script.
Place this with the other create thread commands:
- Code:
004F: create_thread @Starter
4: After we did this, search for:
- Code:
//-------------Mission 0---------------
Before this place the starter of the extranal script:
- Code:
:Starter
03A4: name_thread 'Starter'
:Start_1
0001: wait 0 ms
00D6: if
0256: player $PLAYER_CHAR defined
004D: jump_if_false @Start_1
00D6: if 0
0038: $BMWW == 0
004D: jump_if_false @Start_1
00D6: if 0
00FF: actor $PLAYER_ACTOR sphere 1 near_point_on_foot X.Y.Z radius 2.0 2.0 2.0
004D: jump_if_false @Start_3
:Start_2
0926: $Script_Status = external_script_status 78
00D6: if
0038: $Script_Status == 0
004D: jump_if_false @Start_5
08A9: load_external_script 1
00D6: if 0
08AB: external_script 78 loaded
004D: jump_if_false @Start_5
0913: run_external_script 78
:Start_5
0002: jump @Start_4
:Start_3
090F: end_external_script 78
:Start_4
0002: jump @Start_1
Of course, you should edit the starter, if needed, and replace X.Y.Z with coords.
5: Now, we have did this, you can go down to the last extranal script, and place yours:
- Code:
//---------------------External script -1 (TEST)----------------------------
:Demo
03A4: name_thread "BMWW"
0004: $BMWW = 1
//------------------------------------
//contents will go here
//------------------------------------
0004: $BMWW = 0
004E: end_thread
Notes:
A external script is a thread too. So no going above 33@ like normal scripts, they are valued to 0@..to 33@ (32@, 33@ local timers).
Relating to Mission Packs
In Mission Packs the game does not load the script.img, which means, external scripts, do not work. There is a patch which fixes this problem. Click!