Minetest logo

IRC log for #minetest-mods, 2013-05-28

| Channels | #minetest-mods index | Today | | Google Search | Plaintext

All times shown according to UTC.

Time Nick Message
05:01 Someguy123 joined #minetest-mods
10:12 rubenwardy joined #minetest-mods
11:35 PilzAdam joined #minetest-mods
14:18 PilzAdam joined #minetest-mods
19:52 Guest57660 joined #minetest-mods
23:31 ExcaliburZero joined #minetest-mods
23:35 ExcaliburZero I am currently seeing if I can rework the fireball attack used by Dungeon Masters from the mobs mod so that they can be made into an item that a player can use to shoot fireballs, or have a node that can shoot fireballs where a player directs them. I was wondering, is there a way to get the direction that a player is facing and set the direction of the fireball to that direction?
23:37 PilzAdam the player look direction can be gotten via: player:get_look_dir()
23:38 PilzAdam and the direction of the fireball can be set via obj:setvelocity(vector)
23:43 ExcaliburZero Thanks!
23:43 ExcaliburZero I'll try working around with it and see if it works.
23:44 PilzAdam maybe look at the code how Simple Mobs does it: https://github.com/PilzAdam/m‚Äčobs/blob/master/api.lua#L417
23:44 PilzAdam but its definetly more complicated than you need
23:45 ExcaliburZero Yep, I've been looking at the simple mobs code for it.
23:54 ExcaliburZero I tried running the code, but it gave an error. Can you help me find the error? The code is here: http://codepad.org/SVkArdnx
23:55 PilzAdam well, you try to run a function from simple mobs to register the arrow
23:55 ExcaliburZero I believe I have found the error. I didn't know how to add an arrow so I used "minetest.env:add_arrow".
23:56 PilzAdam you should go into api.lua an replace the register_arrow() call with the according minetest.register_entity() call

| Channels | #minetest-mods index | Today | | Google Search | Plaintext