| Time |
Nick |
Message |
| 01:07 |
|
sstrandberg joined #minetest-delta |
| 06:16 |
|
jyfl9871 joined #minetest-delta |
| 06:38 |
|
Calinou joined #minetest-delta |
| 08:29 |
|
Xenux joined #minetest-delta |
| 09:06 |
|
neko259 joined #minetest-delta |
| 09:09 |
|
nyuszika7h joined #minetest-delta |
| 10:59 |
|
PilzAdam joined #minetest-delta |
| 11:11 |
|
Xenux joined #minetest-delta |
| 11:39 |
|
celeron55 joined #minetest-delta |
| 13:01 |
|
Wuzzy joined #minetest-delta |
| 13:40 |
|
CiaranG joined #minetest-delta |
| 13:58 |
|
rubenwardy joined #minetest-delta |
| 15:45 |
|
mrtux joined #minetest-delta |
| 15:47 |
|
VanessaE_[L] joined #minetest-delta |
| 15:55 |
|
rubenwardy1 joined #minetest-delta |
| 16:10 |
|
rsiska joined #minetest-delta |
| 16:18 |
|
Weedy_lappy joined #minetest-delta |
| 16:18 |
|
Weedy_lappy joined #minetest-delta |
| 16:21 |
|
Calinou joined #minetest-delta |
| 16:23 |
|
AllegedlyDead joined #minetest-delta |
| 17:18 |
|
rubenwardy left #minetest-delta |
| 17:55 |
|
CiaranG joined #minetest-delta |
| 19:10 |
PilzAdam |
Taoki, do you still need help with the Lua script for player animation? |
| 19:10 |
Taoki |
totally. Am going to ask RBA something when he's back, but till then I have a greater problem |
| 19:12 |
PilzAdam |
Maybe i can help a bit |
| 19:13 |
Taoki |
Main problem is that I need to store a value specific to my lua script for each player on the server, to know what animation they're set to at that moment |
| 19:13 |
Taoki |
But I read players in a for loop that executes in on_step |
| 19:13 |
PilzAdam |
you cant store variables in the player objects |
| 19:13 |
Taoki |
So basically, as I do for(obj in connected_clients bla bla bla) I need to have a value called something in my script and read / write to / from obj.something in various functions |
| 19:13 |
PilzAdam |
but you can create a table wich does that |
| 19:14 |
Taoki |
hmm |
| 19:14 |
PilzAdam |
at the top of the script: local player_anim = {} |
| 19:14 |
PilzAdam |
then store initial content in register_on_joinplayer: player_anim.player:get_player_name() = [content] |
| 19:15 |
PilzAdam |
and read/write it in on_step with player_anim.player:get_player_name() |
| 19:15 |
Taoki |
interesting... I will try that out |
| 19:15 |
PilzAdam |
all data will be lost when shutting down, but i guess thats not a big problem |
| 19:16 |
PilzAdam |
(unless you want animation to continue on next startup) |
| 19:16 |
Taoki |
Not important at all here |
| 19:16 |
Taoki |
no |
| 19:16 |
Taoki |
Thanks, will try this out then |
| 19:17 |
PilzAdam |
better use player_anim[player:get_player_name()] |
| 19:17 |
PilzAdam |
dunno if the other way works |
| 19:17 |
PilzAdam |
but with the [] it works |
| 19:17 |
Taoki |
For both reading and writing? |
| 19:17 |
PilzAdam |
yep |
| 19:17 |
PilzAdam |
you index the table with the player name |
| 19:17 |
Taoki |
Also, in that player_admin table I'll need to have multiple options to read and write |
| 19:18 |
PilzAdam |
you basically have an array that has the player name as index |
| 19:19 |
PilzAdam |
what do you mean with " multiple options to read and write"? |
| 19:19 |
Taoki |
ok. So both to read and write, I'd use player_anim[player_name] == or = something |
| 19:19 |
Taoki |
Well for example, I might need something like player_anim[player_name].anim_standing == true |
| 19:20 |
PilzAdam |
yes, thats possbile |
| 19:20 |
Taoki |
Though I could use an integer to "name" each animation... that would be shorter cleaner and better |
| 19:20 |
PilzAdam |
just create a sub table |
| 19:20 |
Taoki |
Nah, actually no. If possible I'll use the player_anim field as an integer |
| 19:21 |
PilzAdam |
I just say that its possible |
| 19:21 |
Taoki |
yeah. That's good to know for the future |
| 19:21 |
PilzAdam |
varaibles in Lua can store everything, even functions |
| 19:23 |
PilzAdam |
btw: the bug that attachments of other players are incorrect when joining a server still exists |
| 19:24 |
Taoki |
Might be a problem with client objects not having the same ID as their server variants |
| 20:11 |
|
Xenux joined #minetest-delta |
| 20:14 |
|
xy joined #minetest-delta |
| 20:16 |
|
sstrandberg joined #minetest-delta |
| 22:15 |
|
doserj joined #minetest-delta |