Minetest logo

IRC log for #minetest, 2023-11-29

| Channels | #minetest index | Today | | Google Search | Plaintext

All times shown according to UTC.

Time Nick Message
00:09 Sobinec joined #minetest
00:54 muurkha joined #minetest
00:56 DeepThgt joined #minetest
00:56 gxt joined #minetest
00:58 calculon joined #minetest
01:06 nm0i joined #minetest
01:06 lumidify joined #minetest
01:06 Bombo joined #minetest
01:06 SpaceManiac joined #minetest
01:06 cryne joined #minetest
01:06 Soni joined #minetest
01:06 muurkha joined #minetest
01:06 Sobinec joined #minetest
01:06 rustaceous joined #minetest
01:06 amfl joined #minetest
01:06 ShadowNinja joined #minetest
01:06 Mantar joined #minetest
01:06 peterz joined #minetest
01:06 meldrian joined #minetest
01:06 basxto joined #minetest
01:07 sparky4 joined #minetest
01:07 Thomas-S joined #minetest
01:07 x_ joined #minetest
01:07 ShadowBot joined #minetest
01:07 Yonle joined #minetest
01:07 bdju joined #minetest
01:07 mmuller joined #minetest
01:07 Yonle joined #minetest
01:08 Sobinec joined #minetest
01:09 smk joined #minetest
02:03 compunerd joined #minetest
02:28 est31 joined #minetest
02:28 v-rob joined #minetest
02:30 fling joined #minetest
02:32 smk joined #minetest
02:37 fling joined #minetest
03:56 diceLibrarian2 joined #minetest
04:13 sparky4 joined #minetest
04:52 kamdard joined #minetest
05:00 MTDiscord joined #minetest
05:22 v-rob joined #minetest
05:42 jaca122 joined #minetest
07:01 amfl2 joined #minetest
07:23 calcul0n joined #minetest
07:32 lemonzest joined #minetest
08:27 bodiccea joined #minetest
08:28 jluc joined #minetest
08:39 Sobinec joined #minetest
08:44 TomTom_ joined #minetest
08:49 m42uko_ joined #minetest
09:29 Sobinec joined #minetest
09:38 mrkubax10 joined #minetest
10:31 mrkubax10 joined #minetest
10:53 appguru joined #minetest
11:57 cranez joined #minetest
12:11 cranez joined #minetest
12:35 fling joined #minetest
12:58 Niklp joined #minetest
13:16 fling joined #minetest
14:13 fling joined #minetest
14:30 fling joined #minetest
14:35 appguru joined #minetest
14:51 jaca122 joined #minetest
15:25 fling joined #minetest
16:01 VoxAquila joined #minetest
16:01 gera joined #minetest
16:01 VoxAquila left #minetest
16:05 est31 joined #minetest
16:18 definitelya joined #minetest
16:24 mrkubax10 joined #minetest
16:31 mrkubax10 joined #minetest
16:37 mrkubax10 joined #minetest
16:54 v-rob joined #minetest
18:04 qqq joined #minetest
18:09 Talkless joined #minetest
18:16 shaft joined #minetest
18:16 shaft init.lua:18: attempt to call field 'set_sprite' (a nil value)
18:17 shaft Why is set_sprite not working. I have a Lua entity and try to call self.set_sprite() when it activates
18:17 shaft ?
18:33 oscar joined #minetest
18:48 YuGiOhJCJ joined #minetest
18:55 shaft So why is set_sprite a nil value? It says here https://minetest.gitlab.io/minetest/class-reference/#lua-entity-only-no-op-for-other-objects that it exists
18:55 appguru joined #minetest
18:57 celeron55 in your case "self" is probably not an ObjectRef
18:57 celeron55 but i can't tell because you're not linking any code to check
18:57 MTDiscord <warr1024> It rarely ever is
18:58 MTDiscord <warr1024> try self.object:set_sprite() and see
19:00 shaft The documentation says it's for the lua entity "Lua entity only (no-op for other objects)ΒΆ"
19:00 shaft function Bird:on_activate(self, staticdata, dtime_s)
19:00 shaft self.object:set_sprite({x=0,y=0},1,0.5)
19:00 shaft end
19:00 celeron55 that just means the object has to represent a lua entity
19:01 celeron55 it is not the entity by itself. the relation of a lua entity to an object is that the object is of the type "luaentity", and has a linked set of extra data that contain the lua entity state
19:01 shaft Bird is my sprite entity
19:02 celeron55 that code should work i think
19:03 shaft AsyncErr: Lua: Runtime error from mod 'birds' in callback luaentity_Activate():
19:03 shaft attempt to index field 'object' (a nil value)
19:03 shaft I must be doing something fundamentally wrong
19:07 celeron55 wait why is there a self as the first parameter of Bird::on_activate
19:07 celeron55 self is implied when you use : there
19:07 MTDiscord <warr1024> it should be either .on_activate(self, whatever... or :on_activate(whatever...
19:07 MTDiscord <warr1024> Don't use both : and an explicit self
19:08 celeron55 now self is staticdata, i think, and that's nil when the entity is newly created
19:08 shaft Yes, just noticed myself
19:08 shaft I was just being retarded
19:08 celeron55 frigging dynamic languages, it's as if they were invented to be as difficult to reason about as possible
19:09 MTDiscord <warr1024> Nah, it's optional syntactic sugar that's messing you up here.
19:09 shaft It was my fault. I just copied the paremeters from the documentation not thinking about it
19:09 shaft para
19:10 celeron55 that's one of those things to be hyper aware about when writing lua. stick to either : or . or it will get you
19:25 v-rob joined #minetest
19:45 shaft left #minetest
20:10 MinetestBot [git] sfan5 -> minetest/minetest: Return texture filter settings to previous state 7f93268 https://github.com/minetest/minetest/commit/7f9326805cf558b80c998aaad3a0b4fa96f14841 (2023-11-29T20:09:21Z)
20:10 MinetestBot [git] sfan5 -> minetest/minetest: Enable clean transparent filter in more cases d6a8b54 https://github.com/minetest/minetest/commit/d6a8b546e4d97f1d6537747e250aeac742ab8694 (2023-11-29T20:09:21Z)
20:10 MinetestBot [git] SmallJoker -> minetest/minetest: Server: avoid re-use of recent ParticleSpawner and Sound IDs (#14045) a7e5456 https://github.com/minetest/minetest/commit/a7e545609909e4e56b60878b2030fa13ddc630de (2023-11-29T20:10:19Z)
20:56 shaft joined #minetest
20:57 shaft My bird is getting along. I used select_x_by_camera and it looks pretty good when viewed from the sides
20:58 shaft And automatic_face_movement_dir
20:58 shaft Problem is that when viewed from the top the sprite always aligns with the screens instead of the direction the bird is heading in.
20:58 shaft Can I prevent the sprite from freely rotating when viewed from top or bottom?
21:00 shaft https://litter.catbox.moe/1d5m6s.png
21:00 shaft To illustrate my problem
21:02 Krock shaft: use an upright sprite
21:03 Krock or a custom mesh that simply consists of two panes intersecting each other, similar to grass- that would suffice as a simple 3D model
21:05 shaft Upright sprite would work but doesn't from the sides. And it brings per player troubles if I switch between them
21:06 shaft Krock, that wouldn't work out with the wings
21:06 Krock hence the idea of a custom mesh. it might even be possible to register a node using nodeboxes that you could spawn as entity (wielded item)
21:06 Krock you'd need a top and side texture
21:07 shaft But then you'd see multiple of them at one if I put them on the sides of a block, right?
21:07 shaft Like left face, front face, top face
21:10 Krock shaft: https://i.postimg.cc/mgkR3D9P/grafik.png
21:11 liceDibrarian joined #minetest
21:11 Krock change the box thickness to 1/32 or smaller to have a better appearance
21:11 shaft But I also have a front and back view
21:12 MTDiscord <warr1024> MT's sprites IIRC don't deal with pitch angle.
21:12 Krock well then you probably need Blender
21:12 MTDiscord <warr1024> we just do like the 5-way thing that you'd find in games like Doom where sprites are only ever viewed from the side.
21:13 shaft Can I prevent the top and bottom view somehow then and only show left right front back?
21:15 Krock if there's nothing in the API then probably not
21:20 MTDiscord <warr1024> To prevent top/bottom view, just make sure that the player can never reach an angle significantly above/below it.
21:20 shaft I tried using a four sprite wide image instead of 6 sprites but it just used other sprites.
21:21 shaft That would kinda defeat the purpose warr. It's supposed to be a minetest mod and I don't want to suddenly make the birds fly up just because the player is firing himself in the air with a canon or whatever
21:22 shaft I think the idea by Krock is not that bad
21:22 shaft How do I do that?
21:32 grouinos joined #minetest
21:32 shaft Wouldn't it be better to have two double sided sprites instead of these boxes?
21:32 shaft But then the top view wouldn't be right. Scratch that
21:33 v-rob joined #minetest
21:33 shaft I made the model. What do I need to export it as and how do I apply the animated sprites on the surfaces?
21:46 sparky4 joined #minetest
21:55 maeve joined #minetest
22:06 appguru joined #minetest
22:12 bodiccea joined #minetest
22:32 Niklp4 joined #minetest
23:23 sparky4 joined #minetest
23:27 turtleman joined #minetest
23:35 panwolfram joined #minetest

| Channels | #minetest index | Today | | Google Search | Plaintext