item replacement when RMB is released?

User avatar
Posts: 308
Joined: Tue Dec 06, 2016 05:35
In-game: Joseph16

item replacement when RMB is released?

by Joseph16 » Thu May 30, 2019 01:58

Ok, here goes. I have a sword. When I right click while holding the sword it will replace the sword with another item, lets call this item sword_blocking. I've got this bit working. Now, what I want, is a function that makes the sword_blocking item get replaced with an item of my choice. So like this:

Holding sword>hold down rightclick replaces with sword_blocking>when I release the rightclick I get another item of my choice.

I know about the controls mod and how it has a function for this type of thing but I couldnt get that working. How would I do this? Any example code will be wonderful. Thanks for your time!
Testin' mines since 1989

Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 1 guest