Another "random spawn" question
Sparkyidr
Member Posts: 2,033
Just doing some testing.
I have a spawn actor, and in there I have an attribute :
spawnobjecttimer
if I then have a rule :
Every 0.1 seconds
--change attribute spawnobjecttime to random(10,20)
then I display that attribute as txt and I can see it changing all good. (randomish numbers from 10-20 constantly changing)
I then have a new rule
Every (spawnobjecttime) seconds
--spawn (myobject) < set to apear randomly onscreen
in theory, that should pull the spawnobjecttime value and use that as the "seconds" for the spawn to happen (10,11,12...20) right?
That's what I expected to happen...and when I set the attribute manually, that's what does happen. (i.e. if I set it to 2, is spawns every 2 seconds)
In reality, it spawns in the same way as when I manually set the attribute to 0
My theory feels right, but obviously either I am thinking in a different way to how GS thinks it should work.
Or have I missed something really obvious?
Like I say...just doing some testing to see what happens when I try things a little differently.
I have a spawn actor, and in there I have an attribute :
spawnobjecttimer
if I then have a rule :
Every 0.1 seconds
--change attribute spawnobjecttime to random(10,20)
then I display that attribute as txt and I can see it changing all good. (randomish numbers from 10-20 constantly changing)
I then have a new rule
Every (spawnobjecttime) seconds
--spawn (myobject) < set to apear randomly onscreen
in theory, that should pull the spawnobjecttime value and use that as the "seconds" for the spawn to happen (10,11,12...20) right?
That's what I expected to happen...and when I set the attribute manually, that's what does happen. (i.e. if I set it to 2, is spawns every 2 seconds)
In reality, it spawns in the same way as when I manually set the attribute to 0
My theory feels right, but obviously either I am thinking in a different way to how GS thinks it should work.
Or have I missed something really obvious?
Like I say...just doing some testing to see what happens when I try things a little differently.
Comments
so in my example above it was reading the fact I had it set to 0 in the attributes pane of the editor, and not reading what it was being changed to as it was running.