> So the other trick is the Easel compiler assigns an implicit ID to things like sprites so that it will replace rather than add the second time around
Is the ID computed based on the shape of the expression at runtime or on something else?
Is the ID computed based on the shape of the expression at runtime or on something else?
Great documentation, by the by!
for i in RangeInclusive(1, 10) { TextSprite(i) }
Yes, you found the right place in the documentation. Thanks, yes I worked very hard on the documentation!
The IDs are assigned at compile time by the Easel compiler. So they don’t change in any way at runtime. Does that answer your question?
If you are actually trying to make multiple sprites and not keep replacing them, what you do is you spawn a new entity to hold your extra sprite:
for i in Range(0,10) { Subspawn { TextSprite(i) } }
That code creates 10 sprites and achieves what I think you are thinking of.