Editing: map scripts

Zorchar

Look, Ma! Two Heads!
Hi.

Is there any tutorial explaining map scripts? (as if, the script which becomes the .int file usually named the same as the .map). I didn't manage to find any information about this subject. I mean, a lot of people seems to be creating maps, yet not many (I've seen none) mention the map script(.int) that suppose to be attached to it.

So another question is, what happens if you try to use a map which had no script assigned to it in map editor? Obviously I can check it out for myself but perhaps someone can shed some light on the subject.

And lastly, is there a default script that you can use for a blank map? or is it just start, enter and update procedures?

zorchar@gmail.com
 
A map doesn't necessarily need a map script (and the map script doesn't have to be called like the map name).

The map script is - surprise, surprise - running with the "map object". If a map has no map script attached, simply nothing will happen. The most obvious thing that will not happen is the day and night cycle. The map script also controls MVARs - you define them in the header and then are able to switch the values from any script within the map, but nowhere else. Additionally, the map script is used to link temporary variables between different scripts within the map. Example: Trader chest and trader. A script places the trader inventory into the trader chest. Once you are talking to the trader, the items from the trader chest are moved into the trader inventory. After the dialog is done, the items are moved back to the chest. This way you get actual shop items in the traders place, or, as done in certain situations, make it impossible to steal trader items, because the trader chest is outside the map boundary.

If you need map script examples... well, just look at the Fallout 2 map scripts. There are smaller ones like Arroyo, and gigantic ones like New Reno. You learn the most from reading them.
 
Back
Top