Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

ireth92

7
Posts
1
Following
A member registered Mar 10, 2022

Recent community posts

Yes! As always, thank you so much, Julian.

(1 edit)

Hello Julian, it's me again! :D

I've encountered what I think is a bug with InkObjects. I've created items similarly to your example. However, my items have some variables that are not [InkVisible], for example, the item's sprite or description. The problem is that, during runtime, all the variables not marked [InkVisible] become empty. 

Do you have any idea why this might be happening? 

Thank you in advance!

Julian!! You're a genius!! I'm so, so grateful! You should have a YouTube channel with tutorials about InkObjects. I'm sure many people would appreciate it. Your solution works like a charm. 

Ohh I can't wait to find out if you worked it out! My face looks exactly like the frog in our avatars right now.

Hi Julian. Thank you so much! I had never heard of lambdas before. It's silly that simply adding " () => " in front of the function magically makes it work as an Action (well, I guess the action is to call that function). I had been trying to do just that for the longest time.

Now I just need to solve one last challenge that has to do with InkObjects... something that I'm starting to fear might be impossible. I hope I'm wrong! I want players to be able to create their own characters, and use them inside the Ink story. 

The way I'm trying to accomplish that is by replacing the values in the InkObject I call "Hero", which is a type of InkObjectHero I created, with the values introduced by the player right before the story starts. This seems like the simpler approach, but the Internet doesn't seem to like the idea of modifying scriptable objects at runtime. Instead of finding tutorials on how to do it, all I find are people saying "don't do that!". 

So the other thing I tried is creating a new InkObjectHero at runtime and assigning it as the LibraryObject to observe. However, I've run into a couple problems with this method. Firstly, the ObjectLibrary needs to be rebuilt at runtime in order to include the new Hero, which I don't know how to do (or even if it's possible). And secondly, assuming I could do that, when I add new heroes to the Resources folder they are assigned a new ID, and my story is currently written to use the first ID (0) as the original Hero. I'd somehow need to pass the ID of the Hero the player created to the story. Or maybe change the order in which the Objects are specified in the "Specified Objects List" before updating the Library at runtime, in order to make the new Hero be the first. 

I don't know, maybe there is a much easier way to approach this that I'm not seeing. I hope you can shed some light! Or, at least, let me know if it's even possible to do! Thank you so much in advance!

You're awesome Julian! Thanks a lot :D

It would help to optimize my code if I could pass on parameters to the Action of AddFieldCallback(). As you can see in the image below, There are some repetitive actions that could be simplified in a single action that takes two parameters:  

For example: UpdateAbility(GameObject ability, int value). 

In this case I would need two parameters, but other actions may need more, or less parameters. Is it possible to update your code so the Action taken by AddFieldCallback() could take a variable number of parameters? 

I hope it's not too much to ask! I've been looking for ways to do it but I can't figure it out. You're no doubt a better coder than me, though! ;)

Hello Julian, this package is helping me a great deal! However, I'm having trouble with the Runtime Objects. I'm using the method OnInstanceFieldValueChanged() to update my UI. As I understand it, every time Ink changes a variable of a specific InkObject, this method is triggered. However, is there a way of knowing which is the variable that changed? I want to avoid checking all variables one by one every time one of them changes since there are a lot. Thank you in advance!