I'm working on some general Legend of Zelda ideas as just something to try to learn UnrealScript, and I'm running into this issue with destructible grass.
As of right now, I link the LOZGrass actor to the LOZGrassTriggerVolume in the editor, which when a projectile passes through the volume it successfully calls LOZGrass.GetCut(); however, it only does it halfway. It will spawn the rupee and the emitter, but SetTimer() never gets called until my Pawn touches the volume, which is incredibly confusing to me. Once the projectile passes through, I set bAlreadyDestroyed to true, which shouldn't allow the GetCut() to be called again. It's almost as if GetCut() is paused once the emitter is spawned and doesn't resume until the Pawn touches the volume.
So I guess my question is, "What in the world is going on?" Haha.
class LOZGrassTriggerVolume extends TriggerVolume
var(ConnectToLOZGrass) LOZGrass LG;
var bool bAlreadyDestroyed;
simulated function Touch( Actor Other, PrimitiveComponent OtherComp, vector HitLocation, vector HitNormal )
if(Projectile(Other)!= none && bAlreadyDestroyed == false)
bAlreadyDestroyed = true;
bAlreadyDestroyed = false
[bonusquestion] For some reason SetStaticMesh randomly stopped working as well? [/bonusquestion]
class LOZGrass extends InteractiveFoliageActor
var ParticleSystemComponent PSC;
PSC = WorldInfo.MyEmitterPool.SpawnEmitter(ParticleSystem'Castle_Assets.FX.P_FX_Smoke_SubUV_01',self.Location, self.Rotation);
SetTimer(1.0, false, 'KillEmitter');
bCanBeDamaged = true
bStatic = false
Begin Object Class=StaticMeshComponent Name=LOZGrassMeshComponent