Changing what the enter key does
Anyone know if there's a way to change what the enter (return) key does? There's certain parts in my D-Mod where I don't want the player to be able to access the inventory. Is there an actual script for the key or is it hardcoded?
Hrm. I don't believe you can disable the enter key. You can do wait_for_button() but that freezes the entire game and that doesn't seem like what you're looking for.
Is what you want that the player can't open the inventory, or that the player can't access any weapons/items? Because I have a script written that's constantly disarming the player, so he/she can't actually use anything. I feel like that's the closest you can get. Or maybe it's just the closest I can get.
Is what you want that the player can't open the inventory, or that the player can't access any weapons/items? Because I have a script written that's constantly disarming the player, so he/she can't actually use anything. I feel like that's the closest you can get. Or maybe it's just the closest I can get.
Make a script called "button4.c" and enter something like:
This will only show the inventory when &story isn't 6.
void main(void) { if(&story == 6) { say("no inventory for you!",1); kill_this_task(); } show_inventory(); kill_this_task(); }
This will only show the inventory when &story isn't 6.
Will that actually work?
Yeah, I'm pretty aure it will, I have something similar in my dmod!
"button4.c" changes what happens when you press enter and show_inventory() shows the inventory... it's that simple!
"button4.c" changes what happens when you press enter and show_inventory() shows the inventory... it's that simple!
That's a new feature in Dink 1.08, so it's only been available for the last eight years.
...
Wow, time flies.
...
Wow, time flies.
I'd use kill_this_task() rather than return here. You don't want key scripts to remain in the memory... And say() rather than say_stop() as well, using say_stop() without freezing the player is generally not a great idea.
Thanks!
I guess I could've just looked the key's script from the DinkC Reference, but that didn't cross my mind.
I guess I could've just looked the key's script from the DinkC Reference, but that didn't cross my mind.