Page 1 of 1

Basic turret

PostPosted: Fri Nov 23, 2012 05:40
by jordan4ibanez
Here is a basic turret i created for mauvebic , it auto-detects players (including the owner) and automatically shoots at them.

Download

Video: http://youtu.be/nHWsxzrJwCs

PostPosted: Fri Nov 23, 2012 05:45
by InfinityProject
Nice! Can it see and shoot through blocks?

PostPosted: Fri Nov 23, 2012 05:45
by jordan4ibanez
InfinityProject wrote:Nice! Can it see and shoot through blocks?

Noper! But that is a feature
So you can hide behind blocks and stuff and be tactical!

PostPosted: Fri Nov 23, 2012 05:48
by InfinityProject
Ok good. It'd kind of be cheap to have random things shoot at you while your inside a house.

PostPosted: Fri Nov 23, 2012 06:06
by Aqua
This is cool=D maybe make it so you have to put the bullets in for it to fire?

PostPosted: Fri Nov 23, 2012 18:46
by kaeza
Good. Do you plan to extend this one?

PostPosted: Fri Nov 23, 2012 18:52
by mauvebic
Friggin sweet :-) seems we also found the same laser sound lol freesound.org?

PostPosted: Sat Nov 24, 2012 11:39
by pandaro
Very nice!

PostPosted: Sat Nov 24, 2012 12:29
by webdesigner97
Minetest crashes when I try to start the game with your mod:

13:27:58: ERROR[main]: ========== ERROR FROM LUA ===========
13:27:58: ERROR[main]: Failed to load and run script from
13:27:58: ERROR[main]: C:\Program Files (x86)\Minetest-c55 Win32\minetest-0.4.3-win32\bin\..\mods\minetest\gunz\init.lua:
13:27:58: ERROR[main]: ...etest-0.4.3-win32\bin\..\mods\minetest\gunz\init.lua:9: attempt to index global 'default' (a nil value)
13:27:58: ERROR[main]: stack traceback:
13:27:58: ERROR[main]: ...etest-0.4.3-win32\bin\..\mods\minetest\gunz\init.lua:9: in main chunk
13:27:58: ERROR[main]: =======END OF ERROR FROM LUA ========

PostPosted: Sat Nov 24, 2012 13:03
by PilzAdam
webdesigner97 wrote:Minetest crashes when I try to start the game with your mod:

13:27:58: ERROR[main]: ========== ERROR FROM LUA ===========
13:27:58: ERROR[main]: Failed to load and run script from
13:27:58: ERROR[main]: C:\Program Files (x86)\Minetest-c55 Win32\minetest-0.4.3-win32\bin\..\mods\minetest\gunz\init.lua:
13:27:58: ERROR[main]: ...etest-0.4.3-win32\bin\..\mods\minetest\gunz\init.lua:9: attempt to index global 'default' (a nil value)
13:27:58: ERROR[main]: stack traceback:
13:27:58: ERROR[main]: ...etest-0.4.3-win32\bin\..\mods\minetest\gunz\init.lua:9: in main chunk
13:27:58: ERROR[main]: =======END OF ERROR FROM LUA ========

Add default to depends.txt

PostPosted: Sat Nov 24, 2012 15:43
by mauvebic
its weird how in linux you dont have to declare default as a dependency to use 'default.node_sound_stone_defaults()' but in win32 builds you do.

edit: anyone else notice errant bullets going one way then flying back ( 180 degrees) - the turrets and my guns both do that :-/

PostPosted: Sat Nov 24, 2012 18:24
by webdesigner97
Thx, now it works! Cool mod!

PostPosted: Thu Oct 31, 2013 02:46
by Gorilla
I just tried this in singleplayer under Windows with Minetest 0.4.7 (not dev) and it works quite well. I did increase the range that it starts firing from 17 to 24... Look for the line:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
local objects = minetest.env:get_objects_inside_radius(pos, 7)


I took at guess and made it 17 rather than 7.

Yes, I also needed to add default to depends.txt (you will need to create it) as mentioned by PilzAdam.

PostPosted: Thu Oct 31, 2013 04:04
by kaeza
This is quite an old topic, plus the developer is no longer around. If you would like to keep updating this mod, it would be highly appreciated :) (create a new topic though).