Closed Backlund closed 1 year ago
Have you got player_api installed in your game? Only newer Minetest Game versions that have player_api will work
I installed all dependencies.
I commented out line 206 in functions.lua just for test, then I could ride the motorbike, but the player model became a green pixel model without animations when I got off.
Ok.. What did you look like before you got on? Just regular player model?
Yes, just regular player model.
Ok well it's saying that player_api is a nil value. If you've got player_api installed as you say, I can't imagine what the problem could be.
I think I fixed it. I noticed you already put the player properties in a local variable in that function. local props = player:get_properties() so i changed entity.info.model = player_api.get_animation(player).model to entity.info.model = props.mesh
No need to call the api to get the model again when you already had it in a local variable.
I just commented out that line and that seemed to fix it. Much cooler mod when it doesn't crash the game. :)
Ah, it seems there have been some changes to player_api that I was not aware of. I'll take a look on Monday.
I just commented out that line and that seemed to fix it. Much cooler mod when it doesn't crash the game. :)
What does your player model look like when you get off the bike?
When it gets on the bike it assumes the correct pose, but armor disappears. When it gets off, the armor reappears. Yesterday after multiple rides, I switched to chase camera mode and saw the player model standing upright in the center of the bike, fully armored, but I haven't been able to reproduce today.
My kid is very excited to try your mod. Do you have plans to add a motocross track to world generator?
Oops my finger slipped
My kid is very excited to try your mod. Do you have plans to add a motocross track to world generator?
I'd recommended The Low Road. It's what I used when I was testing. You'd need to use it on a fresh world though.
Ok this whole mod is a mess, I have a load of refactoring to do. I just want you to know that I am working on it, though it may take some time.
"I have a load of refactoring to do" not easy in Lua, so far as I know. Do you have to restart the game between every change? I haven't noticed any tooling for minetest mods. Is there anything that the community could do to help?
Thanks for building and maintaining the mod, though. My son and I dug out a neat underground race track with jumps and obstacles. We're having a lot of fun even with the semi-functional version.
I apologize I've been having some trouble recently and haven't been able to work on this.
For what we're paying you, we can't complain. Well wishes for you, though, through any hard times.
If you could suggest a direction or general approach to the problem, I could try to pitch in with a pull request. LMK. :)
How's it going with this issue? The kids are driving me nuts about this mod 😂
I did some more work on it recently, the code is rather only and messy so I started a rewrite. I haven't had much time recently so I haven't been able to do much.
All that's left to is reimplement the crafting recipes, the colours of bikes, reimplement skidding and fix braking. As well as some minor refactoring
Ok I've got it working, just need to re-implement the sound effect code and clean up a tiny bit then it's ready for release. Should be ready sometime later today
Finally done. #11 Merged, let me know if you've got any further issues. Sorry for the delay.
Fedora 35 MineTest 5.5.0
2022-04-04 23:56:40: ACTION[Server]: singleplayer right-clicks object 2: LuaEntitySAO "motorbike:bike_green" at (211,11,-281) 2022-04-04 23:56:40: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod 'motorbike' in callback luaentity_run_simple_callback(): <.minetest/mods/motorbike/functions.lua:206: attempt to index a nil value 2022-04-04 23:56:40: ERROR[Main]: stack traceback: 2022-04-04 23:56:40: ERROR[Main]: <.minetest/mods/motorbike/functions.lua:206: in function 'attach' 2022-04-04 23:56:40: ERROR[Main]: <.minetest/mods/motorbike/init.lua:91: in function <.minetest/mods/motorbike/init.lua:89> 2022-04-04 23:56:40: ACTION[Server]: singleplayer leaves game. List of players:
It works on Android and Ubuntu, but not on my Fedora computer.