home home

downloads files

forum forum

docs docs

wiki wiki

faq faq

Cube & Cube 2 FORUM


domodifier?

by MisanthropX on 10/22/2008 16:40, 2 messages, last message: 10/22/2008 19:19, 1535 views, last view: 05/02/2024 19:08

hi ppl
im try to do a better weapon change
but... i noticed... all actions youre doing are defined by a "modifier"
i opened the keymap and i found no such thing like a "mousewheelup" or "mousewheeldown"
well my question is.
what are the numbers of the setted modifiers.. what are their actions
and how to set a new modifier?
where i can find them? (i only found in the "cubescript in 21 days these parts of a "script" :
entproperty control

We'll handle the MouseWheel function now;
let's think about entity properties ...
... so we need a multiplier-alias to know wether ..TODO?.. at which factor?!?! ..TODO?.. to scroll fast or at regular speed.
Then we need an alias named game_modifier_n - where n is an appropriate index,
this is the function that get's passed +1 or -1 depending on wether the user scrolled up or down [ orientation? ] .
Last - but not least - we need a keybinding, that will make the function accesible in-game.

my_scroll_multiplier = 1
my_scroll_multlistof = "1 2 5 10 100"
game_modifier_440 = [
// TODO: clean CubeScript
]

])
well thats all and i cant really get much information out that? o.o

so if i want a new weapon change defined by mouse up or mouse down its...
wep_multiplier = 1
wep_multilistof = "0 1 2 3 4 5 6" (all weapons)
and then game_modifier_X = erm..dunno?
well maybe someone know?
someone will tell me? that would be cool

thanks for all > misa

   Board Index   

#1: ..

by jbuk2k7s cookie has gone on 10/22/2008 18:34

http://sauerbraten.org/docs/game.html#weapon

And the mousewheelis bound to universaldelta +1 and universaldelta -1 by default.

reply to this message

#2: ..

by -Redon- on 10/22/2008 19:19

mouse3 = mouse button click
mouse4 = mousewheel up
mouse5 = mousewheel down

but don't overwrite the mouse4 and mouse5 functon because you need them for many functions in sauer, [universaldelta] is binded to them (1 and -1)

"domodifier" is a command that chnages the function of universaldelta, by using commands called "delta_game_x" and "delta_edit_x" for editmode.

So for example, if you activate /domodifier 20
and define delta_game_20 and/or delta_game_20, the mousewheel doesnt execute delta_game_0 or delta_game_0 (default), but the ones you defined.

Then you can use the first parameter of the universaldelta command: 1 on mouse4 and -1 on mouse5.

I dont get what kind of script you want to make, but a script to change floatspeed would be like this for example:

editbind [key] [domodifier 20]
floatspeeds = "10 20 50 100 250 1000"
defaultfloatspeeds = 3

delta_edit_20 = [
defaultfloatspeeds = (+ $arg1 $defaultfloatspeeds)
if (< $defaultfloatspeeds 0) [defaultfloatspeeds = 0]
if (> $defaultfloatspeeds 5) [defaultfloatspeeds = 5]
floatspeed (at $floatspeeds $defaultfloatspeeds)
]


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
53853581 visitors requested 71628379 pages
page created in 0.009 seconds using 10 queries
hosted by Boost Digital