kddekadenz wrote:Works!
But I would use a smaller value for the drowning_seconds.
EDIT: You replied faster then me.. Your way would be better, but I would suggest after 30 s and then every 3 seconds.
randomproof wrote: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.
--EDIT: Removed code. Suggestion was added.
sdzen wrote:you should make it if sand falls on top of you, you begin to drown
sdzen wrote:yes that may work but it should kill you must faster than water
default.register_drowning_node("default:sand")
lord_james wrote:sdzen wrote:yes that may work but it should kill you must faster than water
:S Work on the box. Add in my suggestion 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
default.register_drowning_node("default:sand")
But I think be inside a solid node is a bug.
jordan4ibanez wrote:no..sand and gravel can fall on you
lord_james wrote:Great job! Now, it's only necessary that API allows a custom HUD (for example, bubbles).jordan4ibanez wrote:no..sand and gravel can fall on you
Well... I still think a falling solid node must kill you rather drowning haha. But this feature is for another topic:
http://c55.me/minetest/forum/viewtopic.php?id=1303
Calinou wrote:Could be easy: all nodes deal 2 HP damage per second (= 1 heart). However, you would "suffocate" if only your feet were inside solid blocks and would not suffocate if only your head was (like lava).
sdzen wrote:but what if your flying!
14:13:27: INFO[main]: Client packetcounter (20s):
14:13:27: INFO[main]: cmd 16 count 0
14:13:27: INFO[main]: cmd 32 count 14
14:13:27: INFO[main]: cmd 39 count 0
14:13:27: INFO[main]: cmd 41 count 0
14:13:27: INFO[main]: cmd 49 count 0
14:13:27: INFO[main]: cmd 50 count 93
14:13:27: INFO[main]: cmd 51 count 0
14:13:27: INFO[main]: cmd 52 count 0
14:13:27: INFO[main]: cmd 54 count 0
14:13:27: INFO[main]: cmd 56 count 0
14:13:27: INFO[main]: cmd 58 count 0
14:13:27: INFO[main]: cmd 60 count 0
14:13:27: INFO[main]: cmd 61 count 0
14:13:28: INFO[main]: Client: avg_rtt=0
14:13:28: INFO[ServerThread]: ServerMap: Unloaded 42 blocks from memory, of which 19 were written, 163 blocks in memory.
14:13:28: INFO[ServerThread]: ServerMap: Blocks modified by:
14:13:28: INFO[ServerThread]: setTimestamp: - - - - - - - - - - - - - - 19
14:13:31: INFO[ServerThread]: ServerMap: Unloaded 38 blocks from memory, of which 0 were written, 125 blocks in memory.
14:13:37: VERBOSE[main]: Client: time_of_day=11623 time_speed=96 dr=1000
14:13:38: INFO[main]: Client: avg_rtt=0
14:13:47: INFO[main]: Client packetcounter (20s):
14:13:47: INFO[main]: cmd 16 count 0
14:13:47: INFO[main]: cmd 32 count 0
14:13:47: INFO[main]: cmd 39 count 0
14:13:47: INFO[main]: cmd 41 count 1
14:13:47: INFO[main]: cmd 49 count 0
14:13:47: INFO[main]: cmd 50 count 94
14:13:47: INFO[main]: cmd 51 count 0
14:13:47: INFO[main]: cmd 52 count 0
14:13:47: INFO[main]: cmd 54 count 0
14:13:47: INFO[main]: cmd 56 count 0
14:13:47: INFO[main]: cmd 58 count 0
14:13:47: INFO[main]: cmd 60 count 0
14:13:47: INFO[main]: cmd 61 count 0
14:13:47: INFO[ServerThread]: Players:
14:13:47: INFO[ServerThread]: * singleplayer RemoteClient 2: m_blocks_sent.size()=63, m_blocks_sending.size()=0, m_nearest_unsent_d=0, m_excess_gotblocks=0
14:13:48: INFO[main]: Client: avg_rtt=0
14:13:53: ERROR[ServerThread]: ERROR: An unhandled exception occurred: LuaError: error: ...0120320-win32\bin\..\mods\mesetint\drowning\init.lua:39: attempt to call field 'sound_play' (a nil value)
14:13:53: ERROR[ServerThread]: stack traceback:
In thread 700:
C:\tmp\minetest\src\server.cpp:118: ServerThread::Thread: Assertion '0' failed.
Debug stacks:
DEBUG STACK FOR THREAD 444:
#0 main
#1 ClientMap::renderMap
(Leftover data: #2 ClientEnvironment::step)
(Leftover data: #3 Client::Receive)
(Leftover data: #4 Client::ProcessData)
(Leftover data: #5 MeshUpdateQueue::addBlock)
DEBUG STACK FOR THREAD 700:
#0 ServerThread::Thread
(Leftover data: #1 Server::AsyncRunStep)
(Leftover data: #2 ServerEnvironment::step)
(Leftover data: #3 RemoteClient::GetNextBlocks)
(Leftover data: #4 BlockEmergeQueue::addBlock)
DEBUG STACK FOR THREAD ff4:
#0 MeshUpdateThread::Thread
randomproof wrote: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.
Scott wrote:why does it depend on growing?
Death Dealer wrote:randomproof wrote: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
randomproof wrote:Scott wrote:why does it depend on growing?
It doesn't. It depends on "default" (actually I don't think it does)Death Dealer wrote:randomproof wrote: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... 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.
Death Dealer wrote:randomproof wrote:Scott wrote:why does it depend on growing?
It doesn't. It depends on "default" (actually I don't think it does)Death Dealer wrote: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 think thats the newest.
Users browsing this forum: No registered users and 32 guests