Thread: [Tutorial] Creating Level Scripts
View Single Post
  #45    
Old March 15th, 2011, 03:03 PM
metapod23's Avatar
metapod23
Hardened Trainer
 
Join Date: Mar 2009
Gender: Male
Nature: Timid
I thought I'd post this here since I haven't really read it anywhere else, and I just learned how to do it

If anyone has ever wanted to have multiple "02 Validates values" scripts in one map, you've probably realized that just adding another map script in A-Map doesn't work. However, it is possible to have multiple 02 scripts in one map.

Go to professional header viewer and copy the Map Script Offset and open it in XSE. Got to the offset for the pointer of your 02 script - it will say:

Code:
#raw 0x2
#raw pointer ...
and then list the offset.

Re-write the script for the offset manually (you will likely have to use dynamic offsets, so change what's above to something like:

Code:
#raw 0x2
#raw pointer @go
And under your new dynamic offset, add your multiple script offsets. Basically, if the original is:

Code:
#raw word 0x5050
#raw word 0x1
#raw pointer 0x800000
#raw word 0x0
(And we know that his means that the script at 0x800000 will activate the instant you enter this map if variable 0x5050 is set to 0x1) ... and we have another script at 0x800100 that we want to activate in the same map when var 0x5050 is set to 0x2, we world write:

Code:
#raw word 0x5050
#raw word 0x1
#raw pointer 0x800000
#raw word 0x5050
#raw word 0x2
#raw pointer 0x800100
#raw word 0x0
^ And so on for any additional scripts you want to activate. Once it's compiled, all the scripts should work once the variables you indicated are activated without any freezing or errors, etc. It won't show up properly in A-Map or XSE, but it works

Don't know if this info is known well or not, as I haven't come across it yet, so I'm just posting it for it to be out there.
__________________
Reply With Quote