Jump to content

Recommended Posts

Been working on a set of mods recently adding RPG-like mechanics to the game, and I've come into a roadblock with one mechanic I want to implement.

I want to make a hotkey that checks to see if a player has a shield item equipped (Currently using tags) then issues a command directly to the shield. which is supposed to do the forcefield from the thulecite helmet.

the forcefield works and defends the user, but besides setting it to trigger when first equipped I don't know how to get it to work fluidly in combat by pressing a hotkey such as Z or so. Currently I have a charge ability attached to the player once they press the R key that checks if they have the shielded tag, then lets them move faster and do damage upon impact for a short period of time.

tl:dr: I need help adding a hotkey to all players that sends a signal to the shield prefab telling it to trigger it's forcefield.

marble_shield.lua

modmain.lua

On 01/04/2016 at 5:55 AM, satuisaburda said:

It's a DST mod, and I got the keyhandler component already in the mod, Are there any tutorials on how to use such a component? for things such as player/server to item hotkeys?

Sadly there aren't many tutorials about DS modding

Edited by WhiteAutumn

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...