bullet improvements
parent
e78309e236
commit
9bb1039505
8
init.lua
8
init.lua
|
@ -195,12 +195,18 @@ minetest.register_entity("vehicles:water", {
|
|||
})
|
||||
|
||||
minetest.register_entity("vehicles:bullet", {
|
||||
visual = "sprite",
|
||||
visual = "mesh",
|
||||
mesh = "bullet.b3d",
|
||||
textures = {"vehicles_bullet.png"},
|
||||
velocity = 15,
|
||||
acceleration = -5,
|
||||
damage = 2,
|
||||
collisionbox = {0, 0, 0, 0, 0, 0},
|
||||
on_activate = function(self)
|
||||
local pos = self.object:getpos()
|
||||
minetest.sound_play("shot",
|
||||
{gain = 0.2, max_hear_distance = 3, loop = false})
|
||||
end,
|
||||
on_step = function(self, obj, pos)
|
||||
minetest.after(10, function()
|
||||
self.object:remove()
|
||||
|
|
|
@ -29,6 +29,8 @@ geep.b3d, and vehicles_jeep.png - CC BY-SA 3.0 UNPORTED. Created by Kdog14
|
|||
License for sounds:
|
||||
CC BY-NC 3.0 oniwe https://freesound.org/people/oniwe/sounds/32316/
|
||||
|
||||
shot.ogg - by Kibblesbob http://soundbible.com/1804-M4A1-Single.html
|
||||
|
||||
--License of lib_mount:
|
||||
-- Minetest mod: lib_mount
|
||||
-- =======================
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 155 B After Width: | Height: | Size: 120 B |
Loading…
Reference in New Issue