Posts | ||
---|---|---|
[UT] How to change the Crosshair | Locked | |
Thread Options | ||
Aug 17 2003 Anchor | ||
For UT, How would I go about changing the crosshair/crosshair color? (normally changed through preferences) via UScript? - Edited By [BDA]Perseus On Sun 17th, Aug 2003 @ 8:43:37pm |
||
Aug 17 2003 Anchor | ||
Depends what game your on about - that kinda stuffs useful yano? -- Why wont it save me? |
||
Aug 17 2003 Anchor | ||
Yes sorry, heh, I just edited my post about that |
||
Aug 17 2003 Anchor | ||
Changed the title for you, sure someone will help soon. -- Why wont it save me? |
||
Aug 17 2003 Anchor | ||
Thank you! |
||
|
Aug 19 2003 Anchor | |
I'm not exactly sure how to change colours in UScript, but I did I quick search for ya, and found this in the Paint function:
The varible "H" is the varible type of ChallengeHUD, so its comunicating with unreal Tournaments main HUD. CorsshairColour is obviously a colour varible. "R", "G", and "B", all refer to a colour, "R" is red, "G" is green, and "B" is blue. From what I know, this all represent Byte varibles, so you can't go over 255 for their value. Fiddle with different int's (No Float numbers for Byte's), and you get different colours. Hope this helps. |
||
Aug 19 2003 Anchor | ||
Thank you... Though I am still new at this... so maybe if you could help out a little more so if H is from ChallengeHUD... I would do this?
if I wanted to expand : function Tick(float deltaTime) How would I declare C and H? - Edited By [BDA]Perseus On Tue 19th, Aug 2003 @ 9:44:17pm |
||
Aug 20 2003 Anchor | ||
Let me start by saying that I'm a UT2K3 coder, not UT. These functions are probably not exactly the same, but they are probably similar. XInterface.HudBDeathMatch has the following function.
Engine.Hud has
and
So... to change the default color, just set the CrossHairColor value in the defaultproperties of your class. To override the player's configured crosshair color, you need to override the DrawCrossHair(Canvas C) function. [edit] Why do you want to mess around in Tick() anyway? - Edited By scope.creep On Wed 20th, Aug 2003 @ 9:22:21am [edit] - Edited By scope.creep On Wed 20th, Aug 2003 @ 9:25:19am |
Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.