I'm creating a vertical shoot-em-up and all is going well, I'm using the CTRL key to fire and I also want to be able to use the left mouse button. As soon as I add an 'or' condition for clicking the mouse to also fire I get the following error when running the game and pressing either CTRL or the left mouse button:
TypeError: cur_act is undefined
localhost/Sprite_plugin.js, line 1037
This is either a bug in Construct 2 or a problem in a third party plugin or behavior - please report it to the developer!
If I remove the mouse click everything is fine. Here's the capx: StarForce
I'm using Beta release r99 [paid version]. Does this happen for anyone else?
Here's a [temporary] fix: *.Capx
I basically put the actions into an inactive group called 'Fire', which when ctrl or LMB are pressed, it activates, runs events before deactivating. Put in a start of layout event also for safe measure.
The 'Or' function does work for this. But it didn't prior to me changing the events, so I say 'temporary' fix at the moment.
Hope this helps.
Thanks Andeming, You're getting the error as well? Which browser are you using? I'm using FF 14.0.1. I assumed it would work simply using 'or', weird. Thanks for the temp fix, works great. <img src="smileys/smiley20.gif" border="0" align="middle" />
Develop games in your browser. Powerful, performant & highly capable.
No worries. I was using Google Chrome, WinXP SP3. I'm not quite sure of what causes the bug with the 'OR' conditions, because it does work with some actions, but not with others.
Glad the temp fix works. All the best,
Thanks for the report - there was a bug in the runtime and it should be fixed now!
No probs Ashley. :)