I want this timer to initiate when the player runs through a trigger box. I thought I had an idea of how to do it, but at this point, I've all but given up. What's the best way to go about doing this? This is what I have thus far:
I have this poison script, which complies fine:
int timer = 0Function BeginPoisoned()timer = 0GotoState("Poisoned")RegisterForUpdate(PoisonTick)EndFunctionFunction EndPoisoned()GotoState("")UnregisterForUpdate()EndFunctionState PoisonedEvent OnUpdate() PoisonHitImod.Apply(3) timer += PoisonTick if (timer > DeathTime) PlayerRef.Kill() endifEndEventEndState
I can't figure out how to make my quest call this script correctly. I looked through some other quests and I tried to define this script within the master script of my quest like so:
HVGQ06PoisonScript Property HVGPoisonStartTest Auto
I am able to assign the script to a property. I try to call this script by adding:
HVGQ06PoisonScriptTest.BeginPoisoned
I add this to one of my quest stages, but when I go to compile this script fragment, the one that is supposed to call my function, I get this error:
variable HVGQ06PoisonScriptTest is undefined
none is not a known user-defined type
I don't know where to go with this. I've checked with the quests that I'm trying to copy from and it seems like it should work. Any / all help is appreciated.