heres my code:
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
spawn_third_item_device := class(creative_device):
@editable
ItemSpawner : item_spawner_device = item_spawner_device{}
OnBegin<override>()<suspends>:void =
ItemSpawner.Enable()
ItemSpawner.CycleToNextItem()
ItemSpawner.CycleToNextItem()
ItemSpawner.SpawnItem()
even when i cycle twice to the third item, it always spawns the first one first
HI @KageDemonSlayer ,
If you still haven’t found a way to do it using only Verse, here’s an alternative using devices only:
Step 1:
You will need one Item Spawner Device for the first and second items, another Item Spawner Device for the third item, and in this case, a button to trigger the condition you’re looking for.
Step 2:
Configure the first Item Spawner with the settings you want, for example:
- “Continuously Spawn Items” - Enabled
- “Items Respawn” - Enabled
- Random Spawns - Random
For the second Item Spawner, configure it so that it only activates when the button is pressed (or whatever condition you want).
Then, scroll all the way down to the User Options section and select Spawn Item.
Click the + and add the device you want to trigger it , in this case, using the "On Interact "
(Item Spawner 1)
)
Step 3:
If you want the items to spawn in the same location, you can place both spawners in the same spot and disable the first spawner once the second Item Spawner is activated.
Make sure to disable the base of one of the spawners so they don’t overlap visually.
In the image, you can see how the First Spawner should be configured.
Once the Second Spawner spawns the item and it is picked up, the First Spawner will automatically re-enable itself and start working again
(Item Spawner 2)
)
Hope it helps!