Widget - Fastswitch

Widget - Fastswitch

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Widget - Fastswitch

Post by Beherith »

This widget enable you to switch cameras quickly between your comm and you start position. It switches to whichever is more distant.
Currently its bound to ctrl+shift. You can also change it in the widget code to be alt+shilt or even just shift. If its only shift, then the widget will also activate while typing into the console, so I dont recommend that.

You can also just bind it to any key using:
bind [key] luaui fastswitch

For example edit your uikeys.txt to bind it to tab:

unbind any+tab toggleoverview
bind any+tab luaui fastswitch

http://spring.jobjol.nl/show_file.php?id=1470
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Widget - Fastswitch

Post by Beherith »

Updated to not crash if pressed before game starts, and to use TraceScreenRay to get the ground coordinates of your current camera position.
Post Reply

Return to “Lua Scripts”