Is there an equivalent for on_use, but with rightclick instead of leftclick?
(ignore all posts on this topic from before today, that problem has been solved)
Making a tool do something on rightclick
Making a tool do something on rightclick
Last edited by qwrwed on Tue Dec 24, 2013 14:19, edited 1 time in total.
- webdesigner97
- Member
- Posts: 1327
- Joined: Mon Jul 30, 2012 19:16
- GitHub: webD97
- IRC: webdesigner97
- In-game: webdesigner97
- Location: Cologne, Germany
- Contact:
It seems to be his own indev mod.Krock wrote:I guess this should be posted into the mod's topic.
Visit me: webD97.de | @GitHub | @DeviantArt
Mods: StreetsMod | Vehicles
Featured from my blog: Dockerize the Minetest server
On my own behalf: Chameleon - A PHP image manipulation library built around GD
Mods: StreetsMod | Vehicles
Featured from my blog: Dockerize the Minetest server
On my own behalf: Chameleon - A PHP image manipulation library built around GD
- kaeza
- Moderator
- Posts: 2162
- Joined: Thu Oct 18, 2012 05:00
- GitHub: kaeza
- IRC: kaeza diemartin blaaaaargh
- In-game: kaeza
- Location: Montevideo, Uruguay
- Contact:
I'm not sure this is the reason, but you forgot a parameter here:
Edit: same with the others in the same line.
Reference here.qwrwed wrote:if inv:get_stack('paxeltype') == paxeltype ...
Edit: same with the others in the same line.
Last edited by kaeza on Mon Dec 23, 2013 17:09, edited 1 time in total.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!
Check out my stuff! | Donations greatly appreciated! PayPal
Check out my stuff! | Donations greatly appreciated! PayPal
Thanks kaeza, the crash no longer happens, but the code still doesn't work:
What I am trying do do is: create a node with 5 slots in its formspec - material, pick, axe, shovel(inputs) and paxel(output). If the 4 input nodes are a complete set (e.g. ice crystal, ice pick, ice axe, and ice shovel) and the "Create Paxel" button is pressed, it removes everything from the input slots and places a paxel(e.g. ice paxel) in the output slot. However, on clicking the button, nothing happens.
+
Spoiler
Last edited by qwrwed on Mon Dec 23, 2013 19:47, edited 1 time in total.
- wtfsamcrap
- Member
- Posts: 25
- Joined: Mon Dec 09, 2013 21:23
- Location: Look behind you :)
- Contact:
Ehh heck if ik
lua is not my strong spot c++ is but maby

Code: Select all
local tools ["",""]
function plrclick(player, rightclick)
if tools() then
local rightclick = player_rightclick()
if rightclick() then
<what you want it to do>
end
end
end
Mods
- Casimir
- Member
- Posts: 1189
- Joined: Fri Aug 03, 2012 16:59
- GitHub: CasimirKaPazi
Who is online
Users browsing this forum: Google [Bot] and 1 guest