ok so i have a chainlightning effect that is recursive. the ability fires a missle that does a search on impact and the search finds a new target and fires a missle at it. its recursive so it doesn't really stop after any period of time or number of people hit. The problem is that the lightning missle is HUGE as im using the archon attack beam.
Now if i scale the missle actor down it only scales down the initial missle that is fired from the ability, NOT the ones in the chain.
I wanted to use beams but i couldn't find a way to get the actors to work when i recursively shoot a beam from one person in the chain to the next. so if anyone knows how to do that I could certainly give it a try.
If anyone has any other ideas on how to fix this that would be great.
PS. the reason i'm doing this recursively is because I want the chain to chain like 10-15 times without having to make 10-15 seperate missles and all that. ie. how the mutalisk chain attack works. It seemed like just a ton of work that i didn't really want to do when i could just have a recusive way to chain it.
PPS. if anyone can think of a good way to stop the chain after 10-15 reiterations that would be great.
You can change the size of your actor by sending it a message after making it. You can set the number of max iterations by passing an iterator to the recursive function. Here's an example of both changes:
voidrecursiveFunction(intiteration){if(iteration<15){//All of your function stuff. Create your actor (new missile).ActorSend(libNtve_gf_LastCreatedActor(),"SetScale 0.200000");recursiveFunction(iteration+1);}}
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
ok so i have a chainlightning effect that is recursive. the ability fires a missle that does a search on impact and the search finds a new target and fires a missle at it. its recursive so it doesn't really stop after any period of time or number of people hit. The problem is that the lightning missle is HUGE as im using the archon attack beam.
Now if i scale the missle actor down it only scales down the initial missle that is fired from the ability, NOT the ones in the chain.
I wanted to use beams but i couldn't find a way to get the actors to work when i recursively shoot a beam from one person in the chain to the next. so if anyone knows how to do that I could certainly give it a try.
If anyone has any other ideas on how to fix this that would be great.
PS. the reason i'm doing this recursively is because I want the chain to chain like 10-15 times without having to make 10-15 seperate missles and all that. ie. how the mutalisk chain attack works. It seemed like just a ton of work that i didn't really want to do when i could just have a recusive way to chain it.
PPS. if anyone can think of a good way to stop the chain after 10-15 reiterations that would be great.
@Docablo: Go
You can change the size of your actor by sending it a message after making it. You can set the number of max iterations by passing an iterator to the recursive function. Here's an example of both changes: