Disable default keypress actions?

Ask and answer questions about making games and related topics. Unrelated topics go in that other forum.

Moderators: marionline, SDHawk

Post Reply
User avatar
Foxley
Metal Slime
Posts: 832
Joined: Sat Nov 09, 2013 5:54 pm

Disable default keypress actions?

Post by Foxley »

I have some NPCs that run scripts on Touch activation, but annoyingly, with that activation method they will still be activated with Enter, Space and (I just now discovered this) Ctrl. Is there a way to disable those default keypress actions without suspend player?
TMC
Metal King Slime
Posts: 4101
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

No, there's no way to separate touch activation from use activation*, unless you're riding a vehicle, apparently. Using "set NPC usable" suspends both (but not the "use npc" script command). The best workaround might be to use that command to suspend player activation, and then script your own touch activation. The builtin touch activation is so flaky that I wouldn't recommend using it in a Zelda-like anyway.

*If we did implement a feature for this, I think I would split the current Activation setting into "Player use activation: yes/no" and "Auto-activation: none/touch/step-on", which also solves step-on NPC not being player-usable.
Last edited by TMC on Sat Feb 04, 2017 11:54 pm, edited 1 time in total.
User avatar
Foxley
Metal Slime
Posts: 832
Joined: Sat Nov 09, 2013 5:54 pm

Post by Foxley »

That'd be a cool option to have in the future. I guess for now, I'll just do a per-frame "check slice collide" thingy instead of an on-touch plotscript.
Post Reply