How to make Projectiles Split on hit/ collide with tiles OR How to make Projectiles spawn while the projectile is flying?

So... You're saying you want a projectile to split another projectile's projectile while that projectile is flying in midair to create more projectiles & thereby split into more projectiles, hence spawning more projectiles upon said resulting projectiles colliding with alternating projectiles?
 
So... You're saying you want a projectile to split another projectile's projectile while that projectile is flying in midair to create more projectiles & thereby split into more projectiles, hence spawning more projectiles upon said resulting projectiles colliding with alternating projectiles?
No, i meant like you shoot a projectile, which splits into more while flying OR a projectile that can split on impact, sorry for the weird title
 
So make it split while flying, you just need to have some type of timer variable, and after X amount, kill the projectile and spawn however many more you want.

Same kind of deal with having it split on tile collision, you just spawn as many as you want within OnTileCollide()
 
So make it split while flying, you just need to have some type of timer variable, and after X amount, kill the projectile and spawn however many more you want.

Same kind of deal with having it split on tile collision, you just spawn as many as you want within OnTileCollide()
Yeah the Oncollide thing doesnt work for me, i even asked chatgpt like 100 times, is there any example you can provide?
 
Don't ask chatGPT, it will not give you valid code most of the time. What code did you try? All you need in OnTileCollide() are as many Projectile.NewProjectile() statements as you want.
 
Back
Top Bottom