Search found 214 matches

Return to advanced search

How come there is no splash when you first enter the water. Because I didn't think of it. That and there is a little bit of a delay and I don't care to check how fast the player enters the water to see if it make sense to play a splashing sound. The gasping sound is only to give the player feedback...
by randomproof
Wed Apr 04, 2012 23:25
 
Forum: Old Mods
Topic: [Mod] Drowning [drowning]
Replies: 64
Views: 23967

better 'minetest.get_connected_players'

This should work better than using 'minetest.env:get_objects_inside_radius' though you could have cycled through 'minetest.object_refs' if you wanted all the objects. local connected_players = {} minetest.register_on_joinplayer(function(obj) connected_players[obj:get_player_name()] = obj end) minete...
by randomproof
Wed Apr 04, 2012 23:21
 
Forum: Minetest Engine
Topic: better 'minetest.get_connected_players'
Replies: 3
Views: 1441

Why not use something like this: minetest.register_globalstep(function(dtime) timer = timer + dtime if timer >= 2 then timer = timer - 2 else return end for name, p_obj in pairs(minetest.get_connected_players()) do pos = p_obj:getpos() pos.y = pos.y+30 if minetest.env:get_node(pos).name == "air" the...
by randomproof
Wed Apr 04, 2012 23:16
 
Forum: Minetest Features
Topic: Cycling through nodes
Replies: 9
Views: 2404

add this to your minetest.conf file: server_unload_unused_data_timeout = 3600 This should make it so that mapblocks are unloaded after an hour: You may need to add these too (increase the numbers to fit the size of your machine): # from how far client knows about objects active_object_send_range_blo...
by randomproof
Wed Apr 04, 2012 15:55
 
Forum: WIP Mods
Topic: delete
Replies: 7
Views: 1711

Why didn't you just copy the init lua section for what happens when a player without build privileges tries to remove a node. I don't think you need to patch the server.cpp Because there is no such section unless something had changed in the last few days. I'm in the process of moving and my comput...
by randomproof
Mon Apr 02, 2012 13:44
 
Forum: Old Mods
Topic: [Mod] Node ownership [node_ownership]
Replies: 84
Views: 31906

Sorry I had the wrong file it is supposed to be mapgen.cpp not server.cpp. And yes you must compile the source code to affect this change and make a new map. You can also just add this to the default/init.lua file if you don't want to mess with the source code. It will add a little more iron around ...
by randomproof
Thu Mar 29, 2012 22:16
 
Forum: Minetest Problems
Topic: Iron not spawning try this
Replies: 28
Views: 6818

wokste wrote:
randomproof wrote:Here is a generic version of the growing mod.

What is the license? GPL compatible?
I want to use it, but need to know the license.

I release all rights to this code. Feel free to do whatever you want to with this code.
by randomproof
Wed Mar 28, 2012 20:00
 
Forum: Old Mods
Topic: [Mod] Growing [growing]
Replies: 8
Views: 8355

I've redone the mod checking for air instead of water, but I haven't uploaded it yet. I will when I get home later today.
by randomproof
Wed Mar 28, 2012 18:54
 
Forum: Old Mods
Topic: [Mod] Drowning [drowning]
Replies: 64
Views: 23967

why does it depend on growing? It doesn't. It depends on "default" (actually I don't think it does) thanks^_^ it still crashs when swim in oil tho Hmmm... I don't use the oil mod so I don't know why. I can't see why if you are using the most recent version from github. i am using ver 20120320. i th...
by randomproof
Tue Mar 27, 2012 23:30
 
Forum: Old Mods
Topic: [Mod] Drowning [drowning]
Replies: 64
Views: 23967

why does it depend on growing? It doesn't. It depends on "default" (actually I don't think it does) I think it might be because I forgot the depends.txt file. I've updated the download, but you could add the depends.txt file with "default" in it. thanks^_^ it still crashs when swim in oil tho Hmmm....
by randomproof
Tue Mar 27, 2012 23:18
 
Forum: Old Mods
Topic: [Mod] Drowning [drowning]
Replies: 64
Views: 23967

I think it might be because I forgot the depends.txt file. I've updated the download, but you could add the depends.txt file with "default" in it.
by randomproof
Tue Mar 27, 2012 21:53
 
Forum: Old Mods
Topic: [Mod] Drowning [drowning]
Replies: 64
Views: 23967

sdzen wrote:but what if your flying!

I can't test to see if you have free_move on so you can drown if flying.
by randomproof
Tue Mar 27, 2012 20:36
 
Forum: Old Mods
Topic: [Mod] Drowning [drowning]
Replies: 64
Views: 23967

If you add
metadata_name = "generic",
to your node def you can save data to the node. Though, I don't think you can save the handle from sound_play or you could, but it would lose its meaning if the server is reset.
by randomproof
Tue Mar 27, 2012 15:15
 
Forum: WIP Mods
Topic: [Demo Mod]Sound Block Example
Replies: 47
Views: 10655

I found another issue with this function. Had to change the line: minetest.timers[index] = nil to: table.remove(minetest.timers,index) and it worked. here is the full code: minetest.timers_to_add = {} minetest.timers = {} minetest.register_globalstep(function(dtime) for _, timer in ipairs(minetest.t...
by randomproof
Mon Mar 26, 2012 23:33
 
Forum: Minetest Engine
Topic: New function: minetest.after(time, func)
Replies: 5
Views: 2497

New function: minetest.after(time, func)

Can I make a small suggestion? Add a variable for passing params to the function minetest.timers_to_add = {} minetest.timers = {} minetest.register_globalstep(function(dtime) for indes, timer in ipairs(minetest.timers_to_add) do table.insert(minetest.timers, timer) end minetest.timers_to_add = {} fo...
by randomproof
Mon Mar 26, 2012 22:48
 
Forum: Minetest Engine
Topic: New function: minetest.after(time, func)
Replies: 5
Views: 2497

Utilisatrice wrote:EDIT : randomproof, can you just update the code for the bed is bigger ? About 2 blocks, please.

I don't think this is possible.
by randomproof
Mon Mar 26, 2012 02:00
 
Forum: WIP Mods
Topic: [Mod] Quick bed mod
Replies: 68
Views: 16595

Code is updated. If you want sand and gravel to drown your players add this to the end of the file:
drowning.register_drowning_node("default:sand")
drowning.register_drowning_node("default:gravel")

Any other mod can depend on this one and add there own as well.
by randomproof
Sun Mar 25, 2012 21:50
 
Forum: Old Mods
Topic: [Mod] Drowning [drowning]
Replies: 64
Views: 23967

sdzen wrote:you should make it if sand falls on top of you, you begin to drown

Could just check if node is not air? Would have to see if free_move is on though.
by randomproof
Sun Mar 25, 2012 18:40
 
Forum: Old Mods
Topic: [Mod] Drowning [drowning]
Replies: 64
Views: 23967

Ok, good. I have to go out shopping with the wife right now, but later I'm going to make a small change so you can set how long you can be underwater before damage starts. So say you want it so that you can be underwater for 60 seconds and then every 10 seconds you get 1 point of damage.
by randomproof
Sun Mar 25, 2012 17:16
 
Forum: Old Mods
Topic: [Mod] Drowning [drowning]
Replies: 64
Views: 23967

by randomproof
Sun Mar 25, 2012 17:12
 
Forum: Minetest Problems
Topic: Removing health off player?
Replies: 7
Views: 2334

[Mod] Drowning [drowning]

Drowning Damage Description: NOW WITH SOUNDS! I haven't had time to test this just yet. I'm not sure if the function IsPlayerUnderWater() is right. I think that the position you get from the player is at the feet and if you add one node up you get where the head is. If someone knows otherwise let m...
by randomproof
Sun Mar 25, 2012 16:43
 
Forum: Old Mods
Topic: [Mod] Drowning [drowning]
Replies: 64
Views: 23967

I think you have completely taken the wrong strategy here. All of your code should be run from the ServerEnvironment::step function like jn said and you should not be calling sleep at all (it will cause the whole server to stop for those 2 seconds). I think it should be possible to do what you want ...
by randomproof
Sun Mar 25, 2012 16:16
 
Forum: Minetest Problems
Topic: Removing health off player?
Replies: 7
Views: 2334

Your right about owning the cube between the two points. The math is some much easier if the spaces are aligned along the grid of the map.
by randomproof
Sun Mar 25, 2012 16:10
 
Forum: Old Mods
Topic: [Mod] Node ownership [node_ownership]
Replies: 84
Views: 31906

Why are you setting the pointer to (0)?
by randomproof
Sat Mar 24, 2012 18:43
 
Forum: Minetest Problems
Topic: Removing health off player?
Replies: 7
Views: 2334

I'll take a closer look when I get some time. Edit: Everything seems to be working on my sample server. I did fix a bug with the /list_areas command. I left out the 'return true' that told the server that my mod handled the command so it gave the error with that, but it still worked. It should be no...
by randomproof
Sat Mar 24, 2012 18:39
 
Forum: Old Mods
Topic: [Mod] Node ownership [node_ownership]
Replies: 84
Views: 31906

Added exported functions: ⋅ admin_tools.set_privilege(player_name, priv, value) Allows you to set arbitrarily player privileges player_name - string priv - string value - boolean ⋅ admin_tools.get_privileges(player_name, priv) Checks the values set with admin_tools.set_privilege,...
by randomproof
Fri Mar 23, 2012 15:55
 
Forum: Mod Releases
Topic: [Mod] Admin Tools [admin_tools]
Replies: 17
Views: 10769

How about something like this. It allows any other mod that depends on it to set and check any privileges they want. So you could use this to allow admins to limit any commands based on privileges they set. Note: it is the other mods job to control what players can set these privileges. I've added t...
by randomproof
Fri Mar 23, 2012 15:47
 
Forum: WIP Mods
Topic: [Mod Feature]
Replies: 5
Views: 1418

You would want the file in the world path:
in lua_api.txt:
minetest.get_worldpath(modname) -> eg. "/home/user/.minetest/world"
^ Useful for storing custom data
by randomproof
Fri Mar 23, 2012 15:28
 
Forum: WIP Mods
Topic: [Mod Feature]
Replies: 5
Views: 1418

RAPHAEL wrote:Can this remove stick remove unknown blocks?

Yes, any node or entity, but players.
by randomproof
Fri Mar 23, 2012 15:23
 
Forum: Mod Releases
Topic: [Mod] Admin Tools [admin_tools]
Replies: 17
Views: 10769

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
/*
            Add iron
        */
        u16 iron_amount = 8;

Here is the code in server.cpp (search for 'Add iron'). Just change the 8 to a bigger number and start a new world.
Edit: Opps, that is supposed to be mapgen.cpp not server.cpp
by randomproof
Thu Mar 22, 2012 14:52
 
Forum: Minetest Problems
Topic: Iron not spawning try this
Replies: 28
Views: 6818
Next

Return to advanced search

cron