In the structure
RepeatSpawnX: Repeat "Iterate X"
OnIteration
ZExpression
SpawnModel TestMod1
how do you do
if(x < 15)
{
SpawnModel TestMod1
} else{
SpawnModel TestMod2
}
Can it be done within the Project tree or is it an edit xml thing? Hints would be fine TIA,
Mic.
spawn model based on conditional?
Moderator: Moderators
k did this with a Condition "Is Iteration < 15?" and an OnTrue SpawnModel 1 with an OnFalse SpawnModel 2. Now I want to add a 3rd Model.
Do I have to
Condition "Is Iteration < 10?"
OnTrue
SpawnModel1
OnFalse
OnCondition "Is Iteration < 20?"
SpawnModel2
OnFalse
SpawnModel3
or can I get to these Components with code in a ZExpression as in
if( Iteration < 10 ) {
spawnModel(Model1)
} else if( Iteration < 20 ) {
spawnModel(Model2)}
else if( Iteration <= 30 ) {
spawnModel(Model3)}
Thanks,
Mic
Do I have to
Condition "Is Iteration < 10?"
OnTrue
SpawnModel1
OnFalse
OnCondition "Is Iteration < 20?"
SpawnModel2
OnFalse
SpawnModel3
or can I get to these Components with code in a ZExpression as in
if( Iteration < 10 ) {
spawnModel(Model1)
} else if( Iteration < 20 ) {
spawnModel(Model2)}
else if( Iteration <= 30 ) {
spawnModel(Model3)}
Thanks,
Mic
You can use the createModel-function that was introduced in 2.0.
It is only documented here at the moment because the documentation wiki is slightly outdated.
It is only documented here at the moment because the documentation wiki is slightly outdated.
good reading - thanks
Is there any info on some of the options that show up under Add Component? Stuff like CallComponent etc? As always TIA.
If you see a component or property that is not documented on the wiki then search for it on this forum and you'll find help. Nothing has been added that hasn't been discussed on these forums first.
For instance info about CallComponent can be found here.
I should really update the wiki but unfortunately I find writing documentation very boring. Which is a shame because if it's not documented no one will use the features of course, but still this is a hobby project I'm doing for fun so things I find boring tend to be postponed . For these reasons volunteers willing to help update the wiki is highly welcomed.
For instance info about CallComponent can be found here.
I should really update the wiki but unfortunately I find writing documentation very boring. Which is a shame because if it's not documented no one will use the features of course, but still this is a hobby project I'm doing for fun so things I find boring tend to be postponed . For these reasons volunteers willing to help update the wiki is highly welcomed.