General Thread |
by Aardappel
on 01/05/2002 01:55, 15527 messages, last message: 03/01/2024 13:02, 12514202 views, last view: 11/01/2024 07:20 |
|
for questions, announcements etc.
|
|
Board Index
|
|
#10867: Re: missing ( |
by Red October
on 07/08/2008 06:04, refers to #10864
|
|
Those scripts work pretty well; however, what I originally intended for the zoom was that you have to be holding the sniper in order to be able to zoom in, and for other weapons there are varying levels of zoom.
Inside the C++ snipe function, I have another couple sections for the chaingun and rocket launcher, each with different zoomed-in FoVs. Is it possible to check the identity of the weapon being held using CubeScript? If so, I wouldn't need to use the C++.
One more thing; how can I add a mask over the zoomed-in view, so that it looks like a scope with a large crosshair over it? They have that effect in AssaultCube, and I wonder if it'll work for Sauerbraten too.
Thank you!
reply to this message
|
|
#10868: .. |
by Osbios
on 07/08/2008 09:07
|
|
Did you even read the scripts? :(
What do you think (getweapon) does?
Expect the mask you can do to all the things with scripts.
reply to this message
|
|
#10869: Re: .. |
by Red October
on 07/08/2008 13:11, refers to #10868
|
|
Yeah, I did... but I missed \"setweapon.\" XD. Thanks. So I guess the way to do this is check if the weapon is the sniper, and if it is, then to change the FOV. But how do I compare the value of cw? Do I do:
if ($cw = \"rifle\") [ ]
?
Thanks.
reply to this message
|
|
#10870: Re: .. |
by Red October
on 07/08/2008 13:13, refers to #10869
|
|
Or
if ($cw = 4) [ ]
?
reply to this message
|
|
#10871: .. |
by Osbios
on 07/08/2008 14:20
|
|
T_T
Exactly that was written in my first script example...
if (= (getweapon) 4) [ ...
]
This could work, too (not tested) :
if (= $cw 4) [ ...
]
You just have to get along with the syntax:
if (= X Y) [ ... ]
reply to this message
|
|
#10872: Re: .. |
by Red October
on 07/08/2008 15:48, refers to #10871
|
|
Well I tried adding that in, but now it zooms no matter what weapon you're holding.
This is what I have in zoom.cfg:
alias "zoom"
bind MOUSE2 [ cw = (getweapon);
cf = $fov;
cs = $sensitivity;
if (= (getweapon) 4)
fov 30;
sensitivity 1;
hudgun 0;
onrelease [ setweapon $cw;
fov $cf;
sensitivity $cs;
hudgun 1;
]
]
]
As far as I can see it should work; I don't know why it doesn't.
reply to this message
|
|
#10873: re |
by Osbios
on 07/08/2008 16:36
|
|
At first don't use the word zoom because the native command for zoom is called the same!
Alias don't work like that.
Use it like this:
alias my_alias [ DO SOMETHING ]
and then us it with bindings
bind MOUSE2 my_alias
There is a "[" missing after the "if" statement.
And you overwrite the hudgun value. Why not save it, too?
Would look like this in the end:
alias my_zoom [ cw = (getweapon);
cf = $fov;
cs = $sensitivity;
ch = $hudgun
if (= (getweapon) 4) [ fov 30;
sensitivity 1;
hudgun 0;
onrelease [ setweapon $cw;
fov $cf;
sensitivity $cs;
hudgun $ch;
]
]
]
bind "MOUSE2" my_zoom;
reply to this message
|
|
#10874: .. |
by Osbios
on 07/08/2008 16:40
|
|
Grrr... I formatted the script with spaces but the forum ate all of them. D:
Some [script][/script] would be nice to prevent this bad looking code!
reply to this message
|
|
#10875: Re: .. |
by Red October
on 07/08/2008 16:56, refers to #10874
|
|
The script works perfect now. Thanks so much! Even though it took me like 10 posts to figure it out... XD
So how can I add a mask while zoomed in?
I really wish there were a list of commands and vars like getweapon - the docs don't help much (or maybe I'm missing something).
Thanks again,
RO
reply to this message
|
|
#10876: Re: .. |
by SheeEttin
on 07/08/2008 17:24, refers to #10875
|
|
If you grep the source for 'COMMANDN?(' and 'I?VAR[FP]*(', you'll get a list of all commands and vars... Most you can figure out what they do by looking at them. Any that you can't figure out what they do, well, you probably shouldn't mess with them. :P
reply to this message
|
|
#10877: .. |
by Osbios
on 07/08/2008 18:06
|
|
I know the getweapon and how to use it from "solaris hudguns".
You could get some of the scripts from quadropolis and try to understand them.
reply to this message
|
|
#10878: Help Command? |
by Jomskylark
on 07/08/2008 20:25
|
|
It's probably right there in front of me, but what's the default help command to type? I've tried /help and #help, but neither works.
For example, #stats works to show stats.
Thanks!
reply to this message
|
|
#10879: Re: Help Command? |
by Jomskylark
on 07/08/2008 20:34, refers to #10878
|
|
Ok, so I found #info. But what command can I type to bring up the info ABOUT the gametype?
If you press tab, it lets you see WHAT gametype. But how do I figure out what I'm supposed to do in that certain gametype?
Thanks.
reply to this message
|
|
#10880: Re: Help Command? |
by jbuk2k7s cookie has gone
on 07/08/2008 21:32, refers to #10879
|
|
http://sauerbraten.org/docs/game.html#mode
reply to this message
|
|
#10881: Re: Help Command? |
by Jomskylark
on 07/09/2008 00:20, refers to #10880
|
|
Okay, I thought there was a little menu that popped up during each gametype or something, but thanks anyway!
reply to this message
|
|
#10882: Simple texture ( aka picmip-like) |
by DavZ
on 07/09/2008 10:27
|
|
Is it possible to set same textures for all maps? I mean one texture by wall /ground/sky etc...
I want to make my game to simple texture like this: http://img233.imageshack.us/my.php?image=ezquake007hi2.jpg
Thank\'s in advance :)
reply to this message
|
|
#10883: .. |
by Osbios
on 07/09/2008 12:19
|
|
Sounds like a attempt of "visual cheating" to me... sorry but I wont tell you. Except you can tell me a good (non cheating) use for it!
reply to this message
|
|
#10884: Re: .. |
by a~baby~rabbit
on 07/09/2008 13:08, refers to #10883
|
|
usage: so your maps load really fast :P
reply to this message
|
|
#10885: Re: .. |
by Hirato Kirata
on 07/09/2008 13:33, refers to #10884
|
|
solution: /texreduce 12 ;P
reply to this message
|
|
#10886: Reducing gridpower? |
by ingsoc
on 07/09/2008 14:26
|
|
Hi,
I've been trying to get a new mode of game working where each player has an 'edit gun' that can modify the terrain. I've been hacking on the source for a while, but I can't find where the maximum gridpower is set. This means that most games end by some idiot wiping out the entire map :)
Can anyone help me out?
reply to this message
|
|
|
Board Index
|
|