[Mod] Simple Mobs [mobs]

ElectricSolstice
Member
 
Posts: 90
Joined: Tue Aug 20, 2013 02:00

by ElectricSolstice » Fri Oct 25, 2013 15:01

brunob.santos wrote:
PilzAdam wrote:
Nightshade wrote:I have this same problem too. Hostile mobs still hang around in the daytime, but they don't attack, and you can't kill them. Rats too--sometimes I try to kill/collect them and I get an error that says something along the lines of "this object exists, but it technically does not exist"...

AFAIK thats a bug in the engine, I cant do anything about it in the mod.

I believe that all bugs for a mod, belong to his own creator. The guilt of his existence is a bug, however, is not obliged to fix.
All entities that become altomaticamente stops should be excluded.
I must say here that you're a great creator of mods.

[spoiler=Ideas]Ideas. I believe it is already time to do this mod to work best, it is impossible to raise livestock when I need to be constantly cleaning.
A good idea would be to create a node that ensure the cattle.
example, "a house for the sheep." when this sheep is cleaned the server, you can spawn node (home) where it was saved.[/spoiler]


He's right though, the bug is in the engine if it's something you can't destroy. I'v seen it too and the entity ends up just walking against a wall being undestroyable and even just going black sometimes. Whenever this occurs, there's a message in my command line, since I run it from the command line, about trying to access a static entity that no longer exists. This mod is not the only thing this bug effects as I've seen it in my command line for other things. However, it seems to be the only mod you can easily notice while playing. As such, any code added to deal with this bug would be a work around rather than an actual bug fix. Off the top of my head, the easiest and quickest fix in the mod would probably be to see If I could just destroy them before they get too far from a player for that code in the engine to be called. However, the best and proper way to fix this mod would be to go and fix the bug in the engine. Also, if I understand correctly, PilzAdam is one of the developers of the engine, so he could fix the bug in the engine and would actually have the power to get such a fix pushed into the engine. However, he's pretty busy, so I wouldn't expect anything anytime soon.
 

User avatar
BrunoMine
Member
 
Posts: 902
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine

by BrunoMine » Fri Oct 25, 2013 15:10

understood. This seems to be one of the reasons for the minetest be a game with the development so slow.
My small square universe under construction ... Minemacro
Comunidade Minetest Brasil
www.minetestbrasil.com
 

User avatar
BrunoMine
Member
 
Posts: 902
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine

by BrunoMine » Fri Oct 25, 2013 22:35

Look, I changed some things, changed the sand_monster by a skeleton.
Image
spawning bones.
Last edited by BrunoMine on Fri Oct 25, 2013 22:36, edited 1 time in total.
My small square universe under construction ... Minemacro
Comunidade Minetest Brasil
www.minetestbrasil.com
 

ElectricSolstice
Member
 
Posts: 90
Joined: Tue Aug 20, 2013 02:00

by ElectricSolstice » Sun Oct 27, 2013 00:52

brunob.santos wrote:Look, I changed some things, changed the sand_monster by a skeleton.
http://img819.imageshack.us/img819/3574/ovdy.png
spawning bones.

O: Maybe should be used to spawn entities from the bones node lol.
 

ElectricSolstice
Member
 
Posts: 90
Joined: Tue Aug 20, 2013 02:00

by ElectricSolstice » Sun Oct 27, 2013 21:36

brunob.santos wrote:Look, I changed some things, changed the sand_monster by a skeleton.
http://img819.imageshack.us/img819/3574/ovdy.png
spawning bones.


Can you give me a link to the blend files or whatever you used to make them? I might consider adding skeletons to my version of mobs.
 

User avatar
BrunoMine
Member
 
Posts: 902
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine

by BrunoMine » Mon Oct 28, 2013 00:43

ElectricSolstice wrote:
brunob.santos wrote:Look, I changed some things, changed the sand_monster by a skeleton.
http://img819.imageshack.us/img819/3574/ovdy.png
spawning bones.


Can you give me a link to the blend files or whatever you used to make them? I might consider adding skeletons to my version of mobs.


Replace this image in folder "models".
Image
I also changed the node spawn. (Bones)
https://github.com/PilzAdam/mobs/blob/master/init.lua#L124
It was interesting, however still needs tweaking. And then, it's time for you to act.
My small square universe under construction ... Minemacro
Comunidade Minetest Brasil
www.minetestbrasil.com
 

ElectricSolstice
Member
 
Posts: 90
Joined: Tue Aug 20, 2013 02:00

by ElectricSolstice » Mon Oct 28, 2013 10:46

brunob.santos wrote:
ElectricSolstice wrote:
brunob.santos wrote:Look, I changed some things, changed the sand_monster by a skeleton.
http://img819.imageshack.us/img819/3574/ovdy.png
spawning bones.


Can you give me a link to the blend files or whatever you used to make them? I might consider adding skeletons to my version of mobs.


Replace this image in folder "models".
http://img7.imageshack.us/img7/8115/skqm.png
I also changed the node spawn. (Bones)
https://github.com/PilzAdam/mobs/blob/master/init.lua#L124
It was interesting, however still needs tweaking. And then, it's time for you to act.


Cool. Do whatever tweaking you need to.
What program did you use to make it? If blender, can I see the blend files too?
 

User avatar
BrunoMine
Member
 
Posts: 902
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine

by BrunoMine » Mon Oct 28, 2013 14:30

I work with lines of code. Simply open like notepad and edit.
The model was edited with paint and GIMP.

Could you please pass me a link to a manual for creating mods. I want to expand my knowledge.
My small square universe under construction ... Minemacro
Comunidade Minetest Brasil
www.minetestbrasil.com
 

ElectricSolstice
Member
 
Posts: 90
Joined: Tue Aug 20, 2013 02:00

by ElectricSolstice » Tue Oct 29, 2013 16:25

brunob.santos wrote:I work with lines of code. Simply open like notepad and edit.
The model was edited with paint and GIMP.

Could you please pass me a link to a manual for creating mods. I want to expand my knowledge.


Here's a reference manual to the api.
Even talks about the mod directory structure in there. At the very least, if you make your own mod, make sure it has an init.lua and a depends.txt file. More than likely though, you'll also want to have inside depends.txt the word default. Also, you'll probably want a textures folder to put all the png files in.
 

lapinusplus
New member
 
Posts: 1
Joined: Wed Oct 30, 2013 09:44

by lapinusplus » Wed Oct 30, 2013 10:59

OwenBean wrote:Sorry - I get a failed to run init.lua


I had the same thing on Windows : it's because the mod's folder had a bad name. To resolve it, you have to :
- download the mod from https://github.com/PilzAdam/mobs/zipball/master,
- unzip
- copy the folder in minetest/mods
- change the name of this folder to "mobs"

If you have some problems with the init.lua for other mods, you can open this file and search de good name for the mod's folder. For example, in the Minetest/mods/mobs/init.lua, we can read :

dofile(minetest.get_modpath("mobs").."/api.lua")


"mobs" is the name to give to the folder.
 

User avatar
Neon
Member
 
Posts: 119
Joined: Thu Aug 15, 2013 02:03
In-game: Neon

by Neon » Thu Oct 31, 2013 03:19

The wool produced by these sheep doesn't seem like the same wool used in Homedecor or elsewhere. Is this true?

Nevermind. I finally dug into the code. The sheep do indeed provide the same wool (wool:white) as seen in the wool mod. The recipes I was thinking that used the wool had been changed, causing my confusion.
Last edited by Neon on Sun Nov 03, 2013 16:49, edited 1 time in total.
 

wcwyes
Member
 
Posts: 145
Joined: Wed Jul 31, 2013 22:42

by wcwyes » Wed Nov 06, 2013 05:11

brunob.santos wrote:Look, I changed some things, changed the sand_monster by a skeleton.
http://img819.imageshack.us/img819/3574/ovdy.png
spawning bones.

may I use your skin?
 

User avatar
Silent-Hunter
Member
 
Posts: 30
Joined: Wed Nov 06, 2013 20:06

by Silent-Hunter » Wed Nov 06, 2013 20:08

I've got some sort of problem:

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
GUIConfigureWorld: Not allowing focus change.
GUIConfigureWorld: Not allowing focus change.
GUIConfigureWorld: Not allowing focus change.
14:49:41: ERROR[main]: mod "mccarpet" has unsatisfied dependencies:  "wool"
14:49:41: ERROR[main]: ========== ERROR FROM LUA ===========
14:49:41: ERROR[main]: Failed to load and run script from
14:49:41: ERROR[main]: /home/silent/.minetest/mods/simplemobs/init.lua:
14:49:41: ERROR[main]: /home/silent/.minetest/mods/simplemobs/init.lua:1: attempt to concatenate a nil value
14:49:41: ERROR[main]: stack traceback:
14:49:41: ERROR[main]:     /home/silent/.minetest/mods/simplemobs/init.lua:1: in main chunk
14:49:41: ERROR[main]: =======END OF ERROR FROM LUA ========
14:49:41: ERROR[main]: Server: Failed to load and run /home/silent/.minetest/mods/simplemobs/init.lua
14:49:41: ERROR[main]: ModError: Failed to load and run /home/silent/.minetest/mods/simplemobs/init.lua
GUIConfigureWorld: Not allowing focus change.
14:57:55: ERROR[main]: ========== ERROR FROM LUA ===========
14:57:55: ERROR[main]: Failed to load and run script from
14:57:55: ERROR[main]: /home/silent/.minetest/mods/simplemobs/init.lua:
14:57:55: ERROR[main]: /home/silent/.minetest/mods/simplemobs/init.lua:1: attempt to concatenate a nil value
14:57:55: ERROR[main]: stack traceback:
14:57:55: ERROR[main]:     /home/silent/.minetest/mods/simplemobs/init.lua:1: in main chunk
14:57:55: ERROR[main]: =======END OF ERROR FROM LUA ========
14:57:55: ERROR[main]: Server: Failed to load and run /home/silent/.minetest/mods/simplemobs/init.lua
14:57:56: ERROR[main]: ModError: Failed to load and run /home/silent/.minetest/mods/simplemobs/init.lua
GUIConfigureWorld: Not allowing focus change.
14:58:23: ERROR[main]: ========== ERROR FROM LUA ===========
14:58:23: ERROR[main]: Failed to load and run script from
14:58:23: ERROR[main]: /home/silent/.minetest/mods/simplemobs/init.lua:
14:58:23: ERROR[main]: /home/silent/.minetest/mods/simplemobs/init.lua:1: attempt to concatenate a nil value
14:58:23: ERROR[main]: stack traceback:
14:58:23: ERROR[main]:     /home/silent/.minetest/mods/simplemobs/init.lua:1: in main chunk
14:58:23: ERROR[main]: =======END OF ERROR FROM LUA ========
14:58:23: ERROR[main]: Server: Failed to load and run /home/silent/.minetest/mods/simplemobs/init.lua
14:58:23: ERROR[main]: ModError: Failed to load and run /home/silent/.minetest/mods/simplemobs/init.lua
15:02:47: ERROR[main]: ========== ERROR FROM LUA ===========
15:02:47: ERROR[main]: Failed to load and run script from
15:02:47: ERROR[main]: /home/silent/.minetest/mods/simplemobs/init.lua:
15:02:47: ERROR[main]: /home/silent/.minetest/mods/simplemobs/init.lua:1: attempt to concatenate a nil value
15:02:47: ERROR[main]: stack traceback:
15:02:47: ERROR[main]:     /home/silent/.minetest/mods/simplemobs/init.lua:1: in main chunk
15:02:47: ERROR[main]: =======END OF ERROR FROM LUA ========
15:02:47: ERROR[main]: Server: Failed to load and run /home/silent/.minetest/mods/simplemobs/init.lua
15:02:47: ERROR[main]: ModError: Failed to load and run /home/silent/.minetest/mods/simplemobs/init.lua
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Wed Nov 06, 2013 20:10

Silent-Hunter wrote:I've got some sort of problem:

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
GUIConfigureWorld: Not allowing focus change.
GUIConfigureWorld: Not allowing focus change.
GUIConfigureWorld: Not allowing focus change.
14:49:41: ERROR[main]: mod "mccarpet" has unsatisfied dependencies:  "wool"
14:49:41: ERROR[main]: ========== ERROR FROM LUA ===========
14:49:41: ERROR[main]: Failed to load and run script from
14:49:41: ERROR[main]: /home/silent/.minetest/mods/simplemobs/init.lua:
14:49:41: ERROR[main]: /home/silent/.minetest/mods/simplemobs/init.lua:1: attempt to concatenate a nil value
14:49:41: ERROR[main]: stack traceback:
14:49:41: ERROR[main]:     /home/silent/.minetest/mods/simplemobs/init.lua:1: in main chunk
14:49:41: ERROR[main]: =======END OF ERROR FROM LUA ========
14:49:41: ERROR[main]: Server: Failed to load and run /home/silent/.minetest/mods/simplemobs/init.lua
14:49:41: ERROR[main]: ModError: Failed to load and run /home/silent/.minetest/mods/simplemobs/init.lua
GUIConfigureWorld: Not allowing focus change.
14:57:55: ERROR[main]: ========== ERROR FROM LUA ===========
14:57:55: ERROR[main]: Failed to load and run script from
14:57:55: ERROR[main]: /home/silent/.minetest/mods/simplemobs/init.lua:
14:57:55: ERROR[main]: /home/silent/.minetest/mods/simplemobs/init.lua:1: attempt to concatenate a nil value
14:57:55: ERROR[main]: stack traceback:
14:57:55: ERROR[main]:     /home/silent/.minetest/mods/simplemobs/init.lua:1: in main chunk
14:57:55: ERROR[main]: =======END OF ERROR FROM LUA ========
14:57:55: ERROR[main]: Server: Failed to load and run /home/silent/.minetest/mods/simplemobs/init.lua
14:57:56: ERROR[main]: ModError: Failed to load and run /home/silent/.minetest/mods/simplemobs/init.lua
GUIConfigureWorld: Not allowing focus change.
14:58:23: ERROR[main]: ========== ERROR FROM LUA ===========
14:58:23: ERROR[main]: Failed to load and run script from
14:58:23: ERROR[main]: /home/silent/.minetest/mods/simplemobs/init.lua:
14:58:23: ERROR[main]: /home/silent/.minetest/mods/simplemobs/init.lua:1: attempt to concatenate a nil value
14:58:23: ERROR[main]: stack traceback:
14:58:23: ERROR[main]:     /home/silent/.minetest/mods/simplemobs/init.lua:1: in main chunk
14:58:23: ERROR[main]: =======END OF ERROR FROM LUA ========
14:58:23: ERROR[main]: Server: Failed to load and run /home/silent/.minetest/mods/simplemobs/init.lua
14:58:23: ERROR[main]: ModError: Failed to load and run /home/silent/.minetest/mods/simplemobs/init.lua
15:02:47: ERROR[main]: ========== ERROR FROM LUA ===========
15:02:47: ERROR[main]: Failed to load and run script from
15:02:47: ERROR[main]: /home/silent/.minetest/mods/simplemobs/init.lua:
15:02:47: ERROR[main]: /home/silent/.minetest/mods/simplemobs/init.lua:1: attempt to concatenate a nil value
15:02:47: ERROR[main]: stack traceback:
15:02:47: ERROR[main]:     /home/silent/.minetest/mods/simplemobs/init.lua:1: in main chunk
15:02:47: ERROR[main]: =======END OF ERROR FROM LUA ========
15:02:47: ERROR[main]: Server: Failed to load and run /home/silent/.minetest/mods/simplemobs/init.lua
15:02:47: ERROR[main]: ModError: Failed to load and run /home/silent/.minetest/mods/simplemobs/init.lua

The correct name for the modfolder is "mobs".
 

User avatar
Silent-Hunter
Member
 
Posts: 30
Joined: Wed Nov 06, 2013 20:06

by Silent-Hunter » Wed Nov 06, 2013 22:15

Oh OK, thanks! Although, gfor some reason I can't seem to add only_peaceful_mobs = true to the minetest.conf, as it reverts when the game starts.

I'm very new at this, I'm probably missing something.
 

User avatar
kaeza
Member
 
Posts: 2141
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

by kaeza » Wed Nov 06, 2013 22:48

Silent-Hunter wrote:I can't seem to add only_peaceful_mobs = true to the minetest.conf, as it reverts when the game starts.

Do not edit `minetest.conf' while the game is running.
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 | BTC: 1DFZAa5VtNG7Levux4oP6BuUzr1e83pJK2
 

User avatar
Silent-Hunter
Member
 
Posts: 30
Joined: Wed Nov 06, 2013 20:06

by Silent-Hunter » Wed Nov 06, 2013 22:59

Thanks! That's odd, I didn't think I did. I must have forgotten to close it first.
 

wcwyes
Member
 
Posts: 145
Joined: Wed Jul 31, 2013 22:42

by wcwyes » Thu Nov 07, 2013 01:25

Is there a way to add a function to the spawn command? Like
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
mobs:register_spawn("dwarves:dwarf", {"default:stone"}, 3, -1, 7000, 3, -7000)
If spawn then
    local name=dwarves:dwarf
    if minetest.get_node(pos.x-2, pos.y, pos.z).name=="air" then
        minetest.env:add_entity(pos.x-2, pos.y, pos.z, name)
    end
    if minetest.get_node(pos.x+2, pos.y, pos.z).name=="air" then
        minetest.env:add_entity(pos.x+2, pos.y, pos.z, name)
    end
    if minetest.get_node(pos.x, pos.y, pos.z-2).name=="air" then
        minetest.env:add_entity(pos.x, pos.y, pos.z-2, name)
    end
    if minetest.get_node(pos.x, pos.y, pos.z+2).name=="air" then
        minetest.env:add_entity(pos.x, pos.y, pos.z+2, name)
    end
end

I know this isn't how it's done but it's a start. I only know of two other options, of one which is improper programming methods, the other just more complicated. I would rather keep it in the mobs family.
 

User avatar
Ikishida
Member
 
Posts: 107
Joined: Sat Aug 17, 2013 08:02

by Ikishida » Thu Nov 14, 2013 05:09

hey,pilzadam,is it okay if i change the textures
to make a pokemon mod?(also,I'll change the
names)
When life hands you lemons,throw it back at life saying "I don't need your goddamn lemons!" =D
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Thu Nov 14, 2013 16:41

Ikishida wrote:hey,pilzadam,is it okay if i change the textures
to make a pokemon mod?(also,I'll change the
names)

Hmmm.... Let me quote the WTFPL:
WTFPL wrote:You just DO WHAT THE FUCK YOU WANT TO.
 

User avatar
Ikishida
Member
 
Posts: 107
Joined: Sat Aug 17, 2013 08:02

by Ikishida » Fri Nov 15, 2013 03:32

PilzAdam wrote:
Ikishida wrote:hey,pilzadam,is it okay if i change the textures
to make a pokemon mod?(also,I'll change the
names)

Hmmm.... Let me quote the WTFPL:
WTFPL wrote:You just DO WHAT THE FUCK YOU WANT TO.


uhh...I mean,can I post when I made a fork?
When life hands you lemons,throw it back at life saying "I don't need your goddamn lemons!" =D
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Fri Nov 15, 2013 03:58

22:58:27: ERROR[main]: ERROR: An unhandled exception occurred: ServerError: LuaError: ...minetest/.minetest/games/vanessae_game/mods/mobs/api.lua:243: attempt to index local 'p' (a nil value)
22:58:27: ERROR[main]: stack traceback:
22:58:27: ERROR[main]: ...minetest/.minetest/games/vanessae_game/mods/mobs/api.lua:243: in function <...minetest/.minetest/games/vanessae_game/mods/mobs/api.lua:115>
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

ElectricSolstice
Member
 
Posts: 90
Joined: Tue Aug 20, 2013 02:00

by ElectricSolstice » Fri Nov 15, 2013 08:05

VanessaE wrote:22:58:27: ERROR[main]: ERROR: An unhandled exception occurred: ServerError: LuaError: ...minetest/.minetest/games/vanessae_game/mods/mobs/api.lua:243: attempt to index local 'p' (a nil value)
22:58:27: ERROR[main]: stack traceback:
22:58:27: ERROR[main]: ...minetest/.minetest/games/vanessae_game/mods/mobs/api.lua:243: in function <...minetest/.minetest/games/vanessae_game/mods/mobs/api.lua:115>


I don't know why that happened, but I do know that the local p is supposed to be the position of a player and it uses minetest.get_connected_players to get this player. Do you have any other details on this error?

I was thinking in his version of the mod though that something was slightly off about the code for following, but I can't remember offhand what I changed. Although, I don't think it'll fix whatever that occured.

Also, people keep in mind my commits that still has yet to be reviewed. My version has the mobs actually jumping to chase you.

https://github.com/ElectricSolstice/mobs


Do you somehow have players that return nil when you get their position?
Last edited by ElectricSolstice on Fri Nov 15, 2013 08:14, edited 1 time in total.
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Fri Nov 15, 2013 11:49

I'm not at all sure what the circumstances were that caused this error to pop up - it was just one of those random things (I see a restart on the servers' IRC channel, check the log, and... like that).
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Fri Nov 15, 2013 14:43

VanessaE wrote:22:58:27: ERROR[main]: ERROR: An unhandled exception occurred: ServerError: LuaError: ...minetest/.minetest/games/vanessae_game/mods/mobs/api.lua:243: attempt to index local 'p' (a nil value)
22:58:27: ERROR[main]: stack traceback:
22:58:27: ERROR[main]: ...minetest/.minetest/games/vanessae_game/mods/mobs/api.lua:243: in function <...minetest/.minetest/games/vanessae_game/mods/mobs/api.lua:115>

proller reported that too. I think it might happen since https://github.com/minetest/minetest/commit/2170c9958a455c228459c795857ec1a890cd05c5.
My guess is that on_step() runs before register_on_leaveplayer(). (That would be a bug in the engine then.)
 

ElectricSolstice
Member
 
Posts: 90
Joined: Tue Aug 20, 2013 02:00

by ElectricSolstice » Fri Nov 15, 2013 17:25

VanessaE wrote:I'm not at all sure what the circumstances were that caused this error to pop up - it was just one of those random things (I see a restart on the servers' IRC channel, check the log, and... like that).


If all you care about is a quick fix for the mod on your server, you could probably wrap that bit of code in an if statement. All that code there does is check for players to start following and a mob wouldn't need to follow a non existant player if pilzAdam is right about step being called before register_on_leaveplayer.

change right after line 242
so if starting at line 241, change it to look like this
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 s = self.object:getpos()
local p = player:getpos()
if p~= nil then
   local dist = ((p.x-s.x)^2 + (p.y-s.y)^2 + (p.z-s.z)^2)^0.5
   if self.view_range and dist < self.view_range then
      self.following = player
   end
end

Last edited by ElectricSolstice on Fri Nov 15, 2013 17:26, edited 1 time in total.
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Sat Nov 16, 2013 00:14

Thanks, I'll give it a try.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Sat Nov 16, 2013 06:42

Seems to help - a similar fix was needed for the subroutine near line 222 also.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

Dukie
New member
 
Posts: 3
Joined: Sat Nov 16, 2013 19:22

by Dukie » Sat Nov 16, 2013 19:28

PilzAdam wrote:Depends:
default
fire


I'm new to Minetest, and recently setup a server for my and my two boys to play on. Working very nicely!

This mod looked interesting, but I can't seem to find the "fire" mod, which it appears to be dependent on.

I've dug through the "Mod Releases" area, and have found other mods mentioning fire, but have had no luck finding a mod specifically titled simply "Fire".

Does anyone have a link please?

Thanks so much! :)
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Sat Nov 16, 2013 19:30

Dukie wrote:
PilzAdam wrote:Depends:
default
fire


I'm new to Minetest, and recently setup a server for my and my two boys to play on. Working very nicely!

This mod looked interesting, but I can't seem to find the "fire" mod, which it appears to be dependent on.

I've dug through the "Mod Releases" area, and have found other mods mentioning fire, but have had no luck finding a mod specifically titled simply "Fire".

Does anyone have a link please?

Thanks so much! :)

Fire is part of minetest_game, so you dont need to install it as an external mod.
 

PreviousNext

Return to Mod Releases

Who is online

Users browsing this forum: Bing [Bot] and 40 guests

cron