spawining using tables
digitalzero
Member, BASIC Posts: 639
is there any way to spawn an actor using tables to increase performance? it seems as if i have a lot of spawn behaviors in my game and i have not tested out the fps rate because im nervous as hell LOL i already know about the change position method but im in dire need of some spawns
Comments
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
now i have to have several different actor spawns per actor so it can randomly spawn between them. would really like to have it work with tables.
other things of the like would be nice to work with tables, like play sound and music, would be nice if i could do a table with 3 or 4 sound names and make the play sound pick from it, so you could have a few jump variations without having to make a different rule for each
Couldn't you just change the image of the single actor instead of spawning a separate actor just for swinging a sword?
If you explain the problem better there may be a way to do what you are doing without spawning, or with minimal spawning and a lot of recycling.
That way my spawner actor can pull those numbers into an expression and calculate how often to spawn, the speed of the spawned actors etc.
After (figure for spawn delay) second, Every (figure for spawn rate) seconds, Spawn actor
In theory you could replace the spawn actor rule with move a recycled actor rule.
Have to admit, not sure either is ideal for a performance POV, repeatedly checking the table every x seconds (game is currently quite laggy) but, well, works in principle