Help with spawning actors using a table
Lunch Table Productions
Member, PRO Posts: 10
Is is possible to spawn an specific actor is the cell value is a specific number? Such as If Table cell value is 1, spawn actor 1. If Table cell value is 2 spawn actor 2 etc.
If so please tell me how to do so
Thanks,
Drake
Comments
It's exactly what you're saying. So you'd need a new rule for each actor you might want to spawn. If you have a range of numbers from 1-10, you'd need 10 different rules each specifying an actor to spawn depending on the condition value.
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
@Braydon_SFX is right. At least, that's how I do it.
In one of my games, I loop through a table (based on time) and grab a specific row. I then have multiple rules set to spawn based on the number
IF attribute (value) = 1
spawn monster1
IF attribute (value) = 2
spawn monster 2
etc.
You will need a rule for each value in the table, so if you have 10 monsters, you will need 10 rules.