So I am trying to make a projectile that periodically explodes as it flies through the air. I currently have the following code: Code: { "projectileName" : "recursivebullet", "image" : "recursive.png", "animationCycle" : 0.25, "frameNumber" : 1, "damageKindImage" : "icon.png", "pointLight" : false, "timeToLive" : 0.1, "actionOnReap" : [ { "action" : "config", "file" : "/projectiles/explosions/vsmallregularexplosion/vsmallregularexplosionknockback.config" }, { "action" : "projectile", "type" : "recursivebullet", "inheritDamageFactor" : 1.0 } ], "power" : 5.0, "speed" : 50, "damageType" : "NoDamage", "damageKind" : "default" } The problem (fairly obviously) is that it never despawns. Is there a way to determine if the bullet connects with the terrain or an entity and NOT spawn a new copy? This seems like a simple fix so I'm hoping to not use lua if I don't have to.
Maybe try "edgeTrigger" : true, ? Not sure what that does, but going by the name it might be what you want.
mind updating teh post when you do get this working as i'd like to make some custom meele attacks that have the same projectile quality's youre trying to accomplish. Also when I saw this, it instantly reminded me of the rhino rocket launchers from borderlands.
The way I got it working was to make six different projectiles and have each projectile spawn the next one. That way it only lasted six explosions (which was way off the side of the screen so should never be seen by the player). It's a workaround, but it sort of accomplishes the same thing. And yes, I was actually inspired by the Pyrophobia from Borderlands 2. Also, as far as I can tell edgeTrigger just reaps the projectile when it leaves the screen. I might be wrong on that.