Quasar Posted June 6, 2005 Eternity now has the ability to fully script the Heads-Up Display system. Here is a screenshot of a test map I made: And here's the Small code that accomplishes it, for people interested in how HUD scripting will generally work. This script doesn't demonstrate everything that is possible, just some basics. new state = 0; // // OnInit // // Called at game startup. Creates a new patch widget for the HUD and // sets the AnimCB callback running every half second. // public OnInit() { _NewPatchWidget("ImpSexPic", "IMPSE1", 160, 100); _SetCallback("AnimCB", _SWAIT_DELAY, 18); } // // OnHUDStart // // Called whenever the HUD resets itself. Sets the new widget to its initial // state. // public OnHUDStart() { state = 0; } // // OnHUDPreDraw // // Called immediately before HUD elements are drawn to the screen. This is the // safest time to alter HUD picture properties. // public OnHUDPreDraw() { if(state == 0) _SetWidgetPatch("ImpSexPic", "IMPSE1"); else _SetWidgetPatch("ImpSexPic", "IMPSE2"); } // // AnimCB // // Called every half second, this function inverts the state of the animation. // The actual pic change is done above, however, so that the graphics will // always be cleared correctly. // public AnimCB() { state ^= 1; _SetCallback("AnimCB", _SWAIT_DELAY, 18); } 0 Share this post Link to post
Murdoch Posted June 11, 2005 Groovy! This may prove useful for resurrecting the old WolfenDOOM missions. 0 Share this post Link to post