2:11pm - Well I've been trying to get myself to think about working for a while now, but it hasn't been easy. I decided to open a Work Post since doing that tends to get me into the work mode.
Last time, I was trying to make an action for my Godot based Action RPG Fantasy Trader game.
I'm borrowing a lot of code from an open source tutorial project, but the portion I'm cribbing from now has a lot of unneccesary back end from being a multi-tiered system for handling "Pawns" which can include static and mobile interactive objects.
While that's technically what I'm doing, they did it in a different way, for a turn-based game, and I don't think I want to use it. So I have to reinvent it.
2:23pm - Huzzah, I'm working! It worked. I'm glad.
2:46pm - Alright, I've made an interactable script, now I need to make the action that will play when the player interacts with it.
3:13pm - So I figured out there's a flaw in the action system as written. The actions originally in the app I'm cribbing from all had to wait for another object to do its thing, so they would yield before returning their 'finished' signal at the end. But my action just does one line of code and signal 'finished' and then yields to wait for the finished signal; the signal was already done so it never comes, halting the game.
I'm going to have to figure out how to fix this...
3:18pm - It looks to me like the only way to do it without completely remaking it to work a different way is to make my actions yield inside somewhere, so the external code has time to prepare for its finished signal. I'm not sure this is a good idea though, since it may still be possible for the code to finish before it's reached the preparation phase. :/
3:29pm - Geez, after all that it doesn't work. It's still sending the finished signal before starting to listen to it.
4:35pm - Well that was obscenely complicated. I had to ask for help on the Godot discord, and eventually someone figured out that you have to yield in a function that has been yielded to in order for it to work. So I did that and now the whole thing works properly.
Now that I've got that fixed I really need to take a break. I've been working more than two hours now. Next up I'll try making the system for putting the player where he needs to be.
Last time, I was trying to make an action for my Godot based Action RPG Fantasy Trader game.
I'm borrowing a lot of code from an open source tutorial project, but the portion I'm cribbing from now has a lot of unneccesary back end from being a multi-tiered system for handling "Pawns" which can include static and mobile interactive objects.
While that's technically what I'm doing, they did it in a different way, for a turn-based game, and I don't think I want to use it. So I have to reinvent it.
2:23pm - Huzzah, I'm working! It worked. I'm glad.
2:46pm - Alright, I've made an interactable script, now I need to make the action that will play when the player interacts with it.
3:13pm - So I figured out there's a flaw in the action system as written. The actions originally in the app I'm cribbing from all had to wait for another object to do its thing, so they would yield before returning their 'finished' signal at the end. But my action just does one line of code and signal 'finished' and then yields to wait for the finished signal; the signal was already done so it never comes, halting the game.
I'm going to have to figure out how to fix this...
3:18pm - It looks to me like the only way to do it without completely remaking it to work a different way is to make my actions yield inside somewhere, so the external code has time to prepare for its finished signal. I'm not sure this is a good idea though, since it may still be possible for the code to finish before it's reached the preparation phase. :/
3:29pm - Geez, after all that it doesn't work. It's still sending the finished signal before starting to listen to it.
4:35pm - Well that was obscenely complicated. I had to ask for help on the Godot discord, and eventually someone figured out that you have to yield in a function that has been yielded to in order for it to work. So I did that and now the whole thing works properly.
Now that I've got that fixed I really need to take a break. I've been working more than two hours now. Next up I'll try making the system for putting the player where he needs to be.