So what I want is to be able to detect when the player has shot their weapon (any of them). I'm currently doing this by having flash detect a click, and then shoot an fsCommand back into Unreal which triggers what I want.
The problem is that Scaleform won't detect right clicks! It catches all of the Primary firing just fine, but none of the secondary firing. I even found code that makes Flash detect right clicks same as left ones, but Scaleform still doesn't detect it.
Is it possible to have Scaleform detect right clicks? Is there an easier way to detect player input than using Scaleform? I'm willing to work in Unrealscript if that has a better solution, I'm just not very adept at it and thought I would start with this method.
Here's my code in AS2:
The problem is that Scaleform won't detect right clicks! It catches all of the Primary firing just fine, but none of the secondary firing. I even found code that makes Flash detect right clicks same as left ones, but Scaleform still doesn't detect it.
Is it possible to have Scaleform detect right clicks? Is there an easier way to detect player input than using Scaleform? I'm willing to work in Unrealscript if that has a better solution, I'm just not very adept at it and thought I would start with this method.
Here's my code in AS2:
Code:
#include "InputHelper.as" import gfx.managers.FocusHandler; function onMouseDown() { fscommand("Command"); } //this MUST be set for input to get setup properly InputWrapper.focused = true; Stage.showMenu = false; //Right click detection that works in Flash only _root.onEnterFrame = function() { if (Key.isDown(2)) { if (!this.wasDown) { this.wasDown = true; rightClick(); } rightClickDown(); } else if (this.wasDown) { this.wasDown = false; rightClickUp(); } } function rightClickDown() { fscommand("Command"); } stop();
Comment