Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: WMCoolmon on June 06, 2006, 11:02:19 pm
-
The "+Override:" field for scripting hooks has been integrated into the scripting system. This means that rather than "YES" and "NO", it's necessary to use "true" and "false". This should be backwards compatible.
This also means that you can use the typical brackets to define a script to run within these fields. The only criteria is that the script must return either 'true' or 'false'. EG:
#Global Hooks
;;Typical usage
$GameInit: [[init.lua]]
+Override: true
;;Here we see full script used
$Splash: [[splash.lua]]
+Override: [
if gr.getScreenWidth() > 640 then
return false
else
return true
end
]
;;Using a function to toggle override
$HUD: [[hud.lua]]
+Override: display_scripting_hud_only()
#End
Changes will take effect with 3.6.9, and the next CVS build.
-
Another thing, I got the getScreenCoords() function for vectors to work. So you should be able to come up with targeting brackets and lead indicators and the like.
-
Do you think this would be enough to create a Starfox64-like 3d reticle?
-
I'm not exactly sure, but probably. As long as you can do the calculations to get the point in 3D space where you want the recticule to be displayed (in world coordinate space) you should be able to use the getScreenCoords to project the 2D image coordinates.
-
does this mean that the hud can be non-distorted when i play at 1280x768?