A question on spawning assets.
A question on spawning assets.
Can I spawn an asset like the cave_in after having used/triggered a button or lever?
If we do not end the war, the war will end us.
Re: A question on spawning assets.
yes, no problem, you just have to do it in a script instead of the spawn item because it limits the type of items that can be spawned.
- add your button
- add a script item "lua" with code:
- connect the button to the script
In this example, pressing the button will spawn the cave in on level one at x,y coordinates 12, 13, facing east (which you see from the west). So you would adjust all the numbers for your situation.
- add your button
- add a script item "lua" with code:
Code: Select all
function makeCavein()
spawn("dungeon_cave_in", 1, 12, 13, 1)
endIn this example, pressing the button will spawn the cave in on level one at x,y coordinates 12, 13, facing east (which you see from the west). So you would adjust all the numbers for your situation.
Finished Dungeons - complete mods to play
