Difference between revisions of "Talk:Oolite JavaScript Reference: Shipdata scripts"

From Elite Wiki
(Comments from Thargoid)
 
(Move to Ship scripts)
 
Line 1: Line 1:
[http://aegidian.org/bb/viewtopic.php?p=90141#90141 Thargoid comments] that there is some room for expansion:
 
* this.[[Oolite JavaScript Reference: world script event handlers#spawnedAsEscort|shipSpawnedAsEscort]] might also be worth mentioning.
 
* this.[[Oolite JavaScript Reference: world script event handlers#shipDied|shipDied]] also triggers when a ship is removed by script.
 
* This is an ideal place to include a brief tutorial about linking such a ship script to the ships AI plist too (AI - [[OXP howto AI#Miscellaneous|sendScriptMessage]]: , js - this.[[Oolite JavaScript Reference: Ship#AIState|ship.AIState]], this.[[Oolite JavaScript Reference: Ship#reactToAIMessage|ship.reactToAIMessage]]). Advanced player stuff but a fair few examples around (some of mine and some of Erics for example, plus several others).
 
* script_action is more than [[Oolite JavaScript Reference: world script event handlers#shipDockedWithStation|shipDockedWithStation]] and Oolite [[Oolite JavaScript Reference: world script event handlers#shipWasScooped|shipWasScooped]], it can be any of the [[Oolite JavaScript Reference: world script event handlers|worldScript]] events. Certainly valid examples thereof, but people might take it as indicative of all that can be done.
 
*The script is unique for that given ship (if you spawn two ships of that particular type, they will both run the same script but independent examples thereof).
 
*It is possible to pass parameters from the [[Shipdata.plist|shipdata.plist]] to the script (via the [[Shipdata.plist#script info|script_info]] key). Again advanced-player stuff but not so difficult.
 
[[User:Pmw57|Pmw57]] 14:04, 9 October 2009 (BST)
 

Latest revision as of 14:14, 9 October 2009