@smokeman Thanks Smokeman! That helps a lot!
FantasticMark
@FantasticMark
3
Posts
1014
Profile views
0
Followers
0
Following
Posts made by FantasticMark
-
RE: How to store live object
-
RE: How to store live object
Thanks for responding my question. Its good to know that I can only store object id to Memory, but what if I want to store the object (lets say an instance of a custom class) other than game object into memory?
-
How to store live object
Hey guys, I'm new to screeps. Recently, I was trying to define a class and create an instance of it to make my code more flexible. But I was stuck in the problem of "not able to store a live object in Memory" as screeps document mentioned. I tried to store object into an array or gobal object outside of function loop, but only found out that screeps will clear everything out every certain amount of ticks. Any ideas of how to keep a live object? I would be much convenient if Memory can store an object.