Difference between revisions of "Useful Scripts"
Jump to navigation
Jump to search
→Hotkey: Shortened script slightly - see "Toggling a Variable Between Two Values" page
imported>Artisten (A new FOSE script for hotkey, need a better quest link) |
imported>Cipscis (→Hotkey: Shortened script slightly - see "Toggling a Variable Between Two Values" page) |
||
Line 232: | Line 232: | ||
Begin GameMode | Begin GameMode | ||
if IsKeyPressed 25 != sToggle | if IsKeyPressed 25 != sToggle | ||
set sToggle to sToggle == 0 | |||
if sToggle ;Button pressed | |||
;Do things when button 'p' is pressed, in this case, decrease karma | ;Do things when button 'p' is pressed, in this case, decrease karma | ||
RewardKarma -650 | RewardKarma -650 | ||
else ;Button released | else ;Button released | ||
;Do things when button 'p' is released, in this case, increase karma | ;Do things when button 'p' is released, in this case, increase karma | ||
RewardKarma 650 | RewardKarma 650 | ||
endif | endif | ||
endif | endif | ||
End | End | ||
</pre> | </pre> |