home home

downloads files

forum forum

docs docs

wiki wiki

faq faq

Cube & Cube 2 FORUM


(Hopefully easy) crosshair question.

by Muki Hyena on 08/30/2007 05:39, 4 messages, last message: 08/30/2007 21:25, 1319 views, last view: 04/19/2024 13:27

I want to change my crosshair in-game using a key that I've also binded to a zoom. I've got three levels of zoom; while zoomed I want to use a crosshair I have in /Data/ called crosshair_scope.png, and unzoomed to use the regular crosshair.png. My crosshair_scope.png is 50x50, so I'm pretty sure it meets the resolution recommendations.

This is what I have and it doesn't seem to be working.

zoom_index = (registersound zoom)
zoomend_index = (registersound zoomend)

bind MOUSE3 [ zoom0 ]
zoom0 = [ fov 120; hudgun 1; crosshairsize 25; sensitivity 3; crosshair = textureload("data/crosshair.png", 3, false); bind MOUSE3 [ sound $zoom_index; zoom1 ] ]
zoom1 = [ fov 60; hudgun 0; crosshairsize 20; sensitivity 2; crosshair = textureload("data/crosshair_scope.png", 3, false); bind MOUSE3 [ sound $zoom_index; zoom2 ] ]
zoom2 = [ fov 10; hudgun 0; crosshairsize 20; sensitivity 1; crosshair = textureload("data/crosshair_scope.png", 3, false); bind MOUSE3 [ sound $zoomend_index; zoom0 ] ]

bind MOUSE4 [ universaldelta 1; zoom0 ]
bind MOUSE5 [ universaldelta -1; zoom0 ]

Help is appreciated in advance.

   Board Index   

#1: ..

by Quin on 08/30/2007 06:19

You can't change the crosshair texture with a script, what you've done there is mix C code in with CubeScript.

reply to this message

#2: Re: ..

by Muki Hyena on 08/30/2007 06:35, refers to #1

So it's impossible? Well SHEEYIT.

reply to this message

#3: ..

by Drakas on 08/30/2007 10:57

lol.

reply to this message

#4: Re: ..

by SheeEttin on 08/30/2007 21:25, refers to #2

Of course, if you defined a command that executed code passed to it, then it could happen.

But I know nothing about this. My experience is really in scripting, not compiled programs.

reply to this message

   Board Index   


Unvalidated accounts can only reply to the 'Permanent Threads' section!


content by Aardappel & eihrul © 2001-2024
website by SleepwalkR © 2001-2024
53855135 visitors requested 71629968 pages
page created in 0.020 seconds using 10 queries
hosted by Boost Digital