Talk:IsKeyPressed - Input: Difference between revisions
Jump to navigation
Jump to search
no edit summary
imported>Cipscis (→Boolean Switch: Fantastic, thanks) |
imported>JustinOther No edit summary |
||
| Line 21: | Line 21: | ||
RegisterForUpdate(0.3) | RegisterForUpdate(0.3) | ||
EndFunction</source>I've got four of these set up to run when arrow keys are pressed (unregistering for update, of course), making it easy to run code variants and compare their speed/cost. | EndFunction</source>I've got four of these set up to run when arrow keys are pressed (unregistering for update, of course), making it easy to run code variants and compare their speed/cost. | ||
Just ran them both through the mill | Just ran them both through the mill iterating both 10^4 times and... | ||
<source lang="papyrus">bIsHotkeyPressed = IsKeyPressed(iHotkey)</source> | <source lang="papyrus">bIsHotkeyPressed = IsKeyPressed(iHotkey)</source> | ||
...spat out... | ...spat out... | ||
| Line 40: | Line 40: | ||
: -- [[User:Cipscis|Cipscis]] ([[User talk:Cipscis|talk]]) 03:38, 22 August 2012 (EDT) | : -- [[User:Cipscis|Cipscis]] ([[User talk:Cipscis|talk]]) 03:38, 22 August 2012 (EDT) | ||
:: Had it not been for your Script Optimisation threads, I'd have never thought to test, so thank ''you''. Those graphs you'd made were like porn for scripters! Definitely got the gears spinning... | |||
:: --[[User:JustinOther|JustinOther]] | |||