Gothic Posted May 24, 2024 (edited) Is there a way to make a VisualThinker do some stuff after a certain period of time? I tried using "if(GetAge())" but doesn't seem to work with them. Is there another way to do it? Here's what I'm trying to do: class FireSprite : VisualThinker { double RollVel; override void PostBeginPlay() { Super.PostBeginPlay(); RollVel = randompick(-14.0,14.0); } override void Tick() { if (bDESTROYED || IsFrozen()) return; Super.Tick(); Roll += RollVel; ///this doesn't work apparently//// if(GetAge() > 10) { Scale -= (0.015,0.015); Alpha -= 0.05; if (Alpha <= 0.0) Destroy(); } //////////////////////////////////// } } Edited May 24, 2024 by Gothic 0 Quote Share this post Link to post
2 jaeden Posted May 24, 2024 For (any non-actor) thinkers, I usually just make an int ctr variable and have a ctr++ on beginning of the Tick() override. Then using the ctr as GetAge() replacement. 1 Quote Share this post Link to post
Question
Gothic
Is there a way to make a VisualThinker do some stuff after a certain period of time? I tried using "if(GetAge())" but doesn't seem to work with them. Is there another way to do it?
Here's what I'm trying to do:
Share this post
Link to post
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.