====== Spawning Random Objects ====== ===== Assets ===== {{ :examples:spawners:spawner-gun.png?nolink&100 |}} {{ :examples:spawners:spawner-bullet.png?nolink&33 |}} {{ :guides:beginners:box.png |}} {{ :guides:beginners:plus.png |}} ===== Code ===== orxObject_CreateFromConfig("CannonObject"); ===== Config ===== [RedBulletObject] Graphic = RedBulletGraphic Speed = (300, -15, 0) ~ (300, 15, 0) ;each bullet goes right with variable height. LifeTime = 2.0 [RedBulletGraphic] Texture = spawner-bullet.png [PlusBulletObject] Graphic = PlusBulletGraphic Speed = (300, -15, 0) ~ (300, 15, 0) LifeTime = 2.0 [PlusBulletGraphic] Texture = plus.png [BoxBulletObject] Graphic = BoxBulletGraphic Speed = (300, -15, 0) ~ (300, 15, 0) LifeTime = 2.0 [BoxBulletGraphic] Texture = box.png [CannonObject] Graphic = CannonGraphic Position = (100, 100, 0) Scale = 5 Spawner = CannonSpawner [CannonGraphic] Texture = spawner-gun.png [CannonSpawner] Object = RedBulletObject # PlusBulletObject # BoxBulletObject ;here is the point. A random chosen spawn. WaveSize = 1 WaveDelay = 0.2 ActiveObject = 10 Position = (10, -1, 0)