chupaescadatri
Banned User
- Joined
- Jul 5, 2014
- Messages
- 338
- Reaction score
- 49
Is it possible to create a USE function in SQM that is in front of the character in the direction he is looking?
Thanks, but it's just the "calculate target tile" that I can not imagine.Yes, it is. You need to get players pos, direction. Then you need to calculate target tile depending on direction. If all that is done you just need to call function g_game.use(useThing) -- (look how it is made in interface.lua), same goes for attack.
Good luck!
Thank you now I understandIf you are facing south then it should take players pos.x, pos.y+1, pos.z etc.