Auto changing color crosshair

Discuss anything to do with Nexuiz here.

Moderators: Nexuiz Moderators, Moderators

Auto changing color crosshair

Postby *HxC*Cuizinier » Sun May 11, 2008 12:47 pm

Hey,
I wanna my crosshair change it color each fire1.
like in pseudocode :
green=0
red=0
blue=0

on fire1{
if(green==1){
red+=0.1
blue+=0.1
green=0
}
if(red==1){
blue+=0.1
green+=.01
red=0
}
...
}

The colors are them of crosshaire.
Can do that with aliases ?
I try with smoething like zoom script but didn't run.
*HxC*Cuizinier
Alien trapper
 
Posts: 286
Joined: Mon Mar 06, 2006 5:35 pm
Location: Toulouse France

Postby Mr. Bougo » Sun May 11, 2008 3:09 pm

Errr and what's the final "else" ?

Can be done with blub's VM.
Mr. Bougo
Keyboard killer
 
Posts: 760
Joined: Mon Sep 10, 2007 3:29 pm

Postby *HxC*Cuizinier » Mon May 12, 2008 12:16 pm

Mr. Bougo wrote:Errr and what's the final "else" ?

Can be done with blub's VM.


In fact, I just want the color change each shoot.
Whats blub's VM ?
*HxC*Cuizinier
Alien trapper
 
Posts: 286
Joined: Mon Mar 06, 2006 5:35 pm
Location: Toulouse France

Postby Blµb » Mon May 12, 2008 1:14 pm

*HxC*Cuizinier wrote:
Mr. Bougo wrote:Errr and what's the final "else" ?

Can be done with blub's VM.


In fact, I just want the color change each shoot.
Whats blub's VM ?


Each shot is hard, but each click works :)
-.- uni's screwing with the servers, so I can't give you any links to the VM cfgs
Blµb
Alien trapper
 
Posts: 277
Joined: Thu Mar 29, 2007 1:49 pm

Postby *HxC*Cuizinier » Tue May 13, 2008 8:39 am

ok, tell me when you can have the script.
Each click is ok. It's just to focus more on the crosshair.
I saw people who change skin or color skin at each direction key pressed.
If anyone else have an idea.
*HxC*Cuizinier
Alien trapper
 
Posts: 286
Joined: Mon Mar 06, 2006 5:35 pm
Location: Toulouse France

Postby shaggy » Tue May 13, 2008 9:52 am

I guess your script could be:

Code: Select all
set fire1 "YOUR SHOOT KEY" // This is the key you shoot with

//Default Starting
set type "green"
set color "1"
bind $fire1 "$type$color"

// The bones of the script
alias green "set type green ; set color 1 ; set green 1; green$green ; bind $fire1 $type$color"
alias green1 "crosshair_color_green"
alias green0 "crosshair_color_white; " // Default crosshair color... Doesn't have to be any

alias red "set type red ; set color 1 ; set green 1; red$red; bind $fire1 $type$color"
alias red1 "crosshair_color_red"
alias red0 "crosshair_color_white; " // Default crosshair color... Doesn't have to be any


I haven't tested this, so it may not work.

Or:
Without a click or anything:
you can use a defer.

http://forums.alientrap.local/viewtopic.php?p=33943#33943
shaggy
Alien trapper
 
Posts: 419
Joined: Tue Apr 03, 2007 6:12 am

Postby *HxC*Cuizinier » Tue May 13, 2008 11:35 am

Thanks Shaggi, I'll test that tonight.
*HxC*Cuizinier
Alien trapper
 
Posts: 286
Joined: Mon Mar 06, 2006 5:35 pm
Location: Toulouse France

Postby Blµb » Tue May 13, 2008 11:46 am

finally, uni server's running again
here you can find some console tricks :)
http://stud4.tuwien.ac.at/~e0725517/nexuiz/x86


here's an example of what console-trickery can do:
http://stud4.tuwien.ac.at/~e0725517/nexuiz/pong.avi
Blµb
Alien trapper
 
Posts: 277
Joined: Thu Mar 29, 2007 1:49 pm

Postby *HxC*Cuizinier » Tue May 13, 2008 5:57 pm

The script of shaggi have no effect :/

errors :
Code: Select all
CVar_get : color is command
"$fire1" isn't a valid key
*HxC*Cuizinier
Alien trapper
 
Posts: 286
Joined: Mon Mar 06, 2006 5:35 pm
Location: Toulouse France

Postby shaggy » Fri May 16, 2008 6:30 am

What did you type in for $fire?

Try:
Code: Select all
bind mouse1 "$type$color"
shaggy
Alien trapper
 
Posts: 419
Joined: Tue Apr 03, 2007 6:12 am

Next

Return to Nexuiz - General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron