Remotely loading an entity? [SOLVED]
- ElCeejo
- Member
- Posts: 210
- Joined: Thu Feb 28, 2019 23:29
- GitHub: ElCeejo
- In-game: ElCeejo
- Location: Your Mother's house
Remotely loading an entity? [SOLVED]
I'm looking for a way to load an entity if no players are nearby, simple as that. I've tried using minetest.forceload_block() but I can't get that to work, not sure if I'm doing something wrong but it never succeeds in forceloading.
Last edited by ElCeejo on Mon Oct 19, 2020 04:03, edited 1 time in total.
Re: Remotely loading an entity?
That is what I use in my mod aviator and there it works for me. Maybe you would like to take a look in my code.
It is already 2 or more years old, so I do not exactly remember how I did it.
- ElCeejo
- Member
- Posts: 210
- Joined: Thu Feb 28, 2019 23:29
- GitHub: ElCeejo
- In-game: ElCeejo
- Location: Your Mother's house
Re: Remotely loading an entity?
Looks like your code just attempt to forceload a block if a local variable is true. In my case this doesn't seem to work, I have to be doing something wrong but I can't find any sort of documentation explaining why it would fail.
Re: Remotely loading an entity?
the variable controls if the radius of aviator is bigger then server active_block_range setting and if it is
the block is forceloaded.
there is a setting in minetest.conf concerning max_forceloaded_blocks. I had to increase it to a higher number
(maybe 1000 I did ?) to make it work.
- ElCeejo
- Member
- Posts: 210
- Joined: Thu Feb 28, 2019 23:29
- GitHub: ElCeejo
- In-game: ElCeejo
- Location: Your Mother's house
Re: Remotely loading an entity?
Huh, looks like I was trying to forceload too many blocks. Lowering it from 32x32x32 to 4x4x4 worked. Thanks for the help!
Who is online
Users browsing this forum: No registered users and 4 guests