Spawn Runes Issue
Posted: Wed Oct 28, 2015 1:30 am
The problem is as follows:
Instead of having Guards all over the place and being spawn 1 by 1 I decide to create an Item that controls guard's.
For this I create a Guard Spawn Rune.
The problem is, that now, I'm trying to make it possible for this runes to go inactive and active. When I set the runes Inactive the Guards get killed and that event is added to a deadnpcarray, which contains all the info necessary to spawn the guard in the exact same place every time.
This brought me a new problem, which is that if I do the cycle, inactive/active, one time it only spawns one guard. The second time I do this it spawn all the guards as it should.
I tried now to set some loops to make sure the guards are all spawned but this brought me to a place where I get a runaway script.
In this process I read and write the rune's variables while I have a control script that also reads and writes to this same variables. To activate and deactivate runes I'm not sending events to the control script. Would doing this through events solve the problem??
Instead of having Guards all over the place and being spawn 1 by 1 I decide to create an Item that controls guard's.
For this I create a Guard Spawn Rune.
The problem is, that now, I'm trying to make it possible for this runes to go inactive and active. When I set the runes Inactive the Guards get killed and that event is added to a deadnpcarray, which contains all the info necessary to spawn the guard in the exact same place every time.
This brought me a new problem, which is that if I do the cycle, inactive/active, one time it only spawns one guard. The second time I do this it spawn all the guards as it should.
I tried now to set some loops to make sure the guards are all spawned but this brought me to a place where I get a runaway script.
In this process I read and write the rune's variables while I have a control script that also reads and writes to this same variables. To activate and deactivate runes I'm not sending events to the control script. Would doing this through events solve the problem??