How to save information to an object and use it later?

How to save information to an object and use it later?

Postby PolySaken » Sat Mar 30, 2019 2:22 am

I am wanting to add information, more specifically a string, to an object when it is created by means of an item use callback.
I also want to retrieve this information when the object collides with another object or a block, and use this to determine what the object should do.

How do I go about doing this?
PolySaken
Member
 
Posts: 311
Joined: Thu Nov 09, 2017 5:18 am
GitHub: PolySaken-I-Am
In-game: PolySaken

Re: How to save information to an object and use it later?

Postby sofar » Sat Mar 30, 2019 2:58 am

Check out some mods that use entities, their code may be a good learning experience.

For instance:

https://github.com/AiTechEye/bows/blob/ ... ow.lua#L59
sofar
Developer
 
Posts: 2034
Joined: Fri Jan 16, 2015 7:31 am
GitHub: sofar
In-game: sofar

Re: How to save information to an object and use it later?

Postby PolySaken » Sat Mar 30, 2019 3:04 am

Ahh ok I got it now
PolySaken
Member
 
Posts: 311
Joined: Thu Nov 09, 2017 5:18 am
GitHub: PolySaken-I-Am
In-game: PolySaken



Return to Modding Discussion



Who is online

Users browsing this forum: Yandex Bot [Bot] and 0 guests