Page 1 of 1

How to reference an actor created by another actor...

PostPosted: Mon Jan 21, 2008 8:14 pm
by yttermayn
The situation is this: I have a MOB that moves around and I want to display some status information that floats over it. The MOB is created by script, and when that MOB is created, it creates a text actor (in its create actor event) with the event actor as the parent,so that it will follow the MOB. Trouble is, if I just reference the text actor in the script that updates the value it displays, then only the original actor that sits off to the side of the game, not visible, gets updated. How do I reference the one that was created by the MOB?

Re: How to reference an actor created by another actor...

PostPosted: Sun Feb 03, 2008 8:22 am
by Thanx
Type in the code where you update that
floatingtext.text = someinfo.text;
Or if it's numbers then use the textNumber, if it is more than one info, then add them up into a string. (as if you were adding numbers, with the + operator.)
That should do the trick. Though I'm not exactly sure wether I understood you the right way.