Dockscreens are powerfull tools which can be used to display information to the player. When you dock with a station or wreck, what you are seeing is a dockscreen. Dockscreens can be used to play out a story, show data, and allow the player to trigger scripted events.

A dockscreen's code looks something like this:

<DockScreen UNID="&dsPlanetRefuseDock;"	name= "=(objGetName gSource)">
 
	<Panes>
		<InitialPane desc= "If you attempted to land on a planet without re-entery equipment, you would burn up and/or crash. Both result in death.">
			<Actions>
				<Action name="Continue" imageID="&rsItemListScreen;" imageIndex="0" cancel="1" key="C">
					<Exit/>
				</Action>
			</Actions>
		</InitialPane>
	</Panes>
</DockScreen>

That code is from Schilcote's Dockable Planets mod.

The first tag in a dockscreen is, of course, the <DockScreen> tag. After that, you define the panes of the dockscreen, which are the things you see. The only pane you see in the above example is the InitalPane, the pane that the dockscreen starts on when it is called. The code name of your pane is what you use for your tag. Since the opening tag of this pane is <InitialPane desc=””>, the name of the pane is InitialPane. The desc=”” is the text you see when you view the pane. Then, inside the pane's tags, you have the Action tag. Actions are the little peices of text which run script when clicked on, or theire key is pressed. The name=”” of an action is the text displayed. The cancel=”” is a boolean value which decides wether the action is triggered when the user presses ESC, and the key=”” decides what keyboard key should choose this action.

The <Initialize> element is evaluated: 1. Whenever the pane is displayed (e.g., (scrShowPane) or something). 2. Whenever the player moves the cursor in the list.

 
dockscreens.txt · Last modified: 2009/08/07 09:34 by digdug
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki