Changing the hud when you put a helmet on

Topics regarding Scripting with Reality Factory
Post Reply
starop
Posts: 2
Joined: Sat Mar 14, 2009 6:34 pm

Changing the hud when you put a helmet on

Post by starop » Tue Nov 29, 2011 3:45 am

Hey, i have a very basic understanding of RF. the game came with a helmet in the demo, and i was just wondering if it were possible to make an image appear on the HUD only when he wears the helmet. I looked through the forums already and could not find the answer i was looking for, if any one could help me, it would be very much appreciated....

User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Re: Changing the hud when you put a helmet on

Post by QuestOfDreams » Sat Dec 03, 2011 7:32 pm

The helmet in the RF demo level is a Pawn entity controlled by the accessory.s script.
You may add a command to activate a HUD element in this script (e.g. at the beginning of the Attach method).
Prior to this, you have to add a HUD picture definition in the HUD.ini file (as described in the HUDInfoFile section of the manual; set the active option of the HUD element to false).
The script method to activate a HUD picture element is:

Code: Select all

ShowHudPicture(int  pictureID, bool show)

Post Reply