Forum

> > CS2D > General > Bind crashing my game
ForenübersichtCS2D-ÜbersichtGeneral-ÜbersichtEinloggen, um zu antworten

Englisch Bind crashing my game

5 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Bind crashing my game

zazz
User Off Offline

Zitieren
Hey, i tried to make a bind to toggle from absolute to relative movement but idk why everytime i toggle the bind my game crashes.. any idea why or how to fix this?.. thanks
1
2
3
4
5
6
7
8
9
10
alias toggle_movement "toggle_movement_command"
alias toggle_movement_command "toggle_movement"

alias toggle_movement_absolute "cl_absolute 1; cl_relative 0; alias toggle_movement toggle_movement_relative"
alias toggle_movement_relative "cl_absolute 0; cl_relative 1; alias toggle_movement toggle_movement_absolute"

alias toggle_movement_absolute_command "toggle_movement_absolute"
alias toggle_movement_relative_command "toggle_movement_relative"

bind "mouse3" "toggle_movement_command"

alt Re: Bind crashing my game

mrc
User Off Offline

Zitieren
WT* are you doing, just: bind "mouse3" "relativemovement"

But I'm not sure if CS2D recognizes mouse3 as a button.

alt Re: Bind crashing my game

slimK
User Off Offline

Zitieren
user mrc hat geschrieben
WT* are you doing, just: bind "mouse3" "relativemovement"

But I'm not sure if CS2D recognizes mouse3 as a button.


Actually you can bind mouse3 but not other buttons (unless you bind mouse buttons to keyboard). I use mouse3 for radio messages .

alt Re: Bind crashing my game

DC
Admin Off Offline

Zitieren
btw: Classic infinite loop here. Pretty sure the first 2 lines are crashing CS2D
1
2
alias toggle_movement "toggle_movement_command"
alias toggle_movement_command "toggle_movement"

I'm not sure what you tried to express here but "alias A B" means: Define A so that running A will run B.

So what you wrote here in the first 2 lines means:
Running toggle_movement will run toggle_movement_command.
Running toggle_movement_command will run toggle_movement.

So toggle_movement will run toggle_movement_command. toggle_movement_command will run toggle_movement. toggle_movement will run toggle_movement_command. toggle_movement_command will run toggle_movement. toggle_movement will run toggle_movement_command. toggle_movement_command will run toggle_movement. toggle_movement will run toggle_movement_command. ... and so on ...

It never ends. It's an infinite loop which does nothing. CS2D will run it really often really quickly and nothing will happen. At some point CS2D will simply crash. It's most likely a stack overflow from calling so many functions.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antwortenGeneral-ÜbersichtCS2D-ÜbersichtForenübersicht