Difference between revisions of "Useful Scripts"

715 bytes added ,  10:50, 2 April 2009
A new FOSE script for hotkey, need a better quest link
imported>Cipscis
imported>Artisten
(A new FOSE script for hotkey, need a better quest link)
Line 217: Line 217:
end
end


</pre>
== Hotkey ==
Script Type: Quest
;Script requires the [[Fallout Script Extender]].
<small>To be placed on a [[Quest_Data_Tab|quest]], it will run some code when a key is released. See [http://fose.silverlock.org/fose_command_doc.html#DirectX_Scancodes FOSEs Command Docs] for additional DirectX Scancodes</small>
<pre>
ScriptName HotkeyReleased
Short sToggle
Begin GameMode
if IsKeyPressed 25 != sToggle
if sToggle == 0 ;Button pressed
;Do things when button 'p' is pressed, in this case, decrease karma
RewardKarma -650
set sToggle to 1
else ;Button released
;Do things when button 'p' is released, in this case, increase karma
RewardKarma 650
set sToggle to 0
endif
endif
End
</pre>
</pre>
Anonymous user