A question on spawning assets.

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
User avatar
Daght
Posts: 146
Joined: Sun Apr 15, 2012 12:28 pm
Location: Italy

A question on spawning assets.

Post by Daght »

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.
User avatar
Komag
Posts: 3659
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: A question on spawning assets.

Post by Komag »

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:

Code: Select all

function makeCavein()
  spawn("dungeon_cave_in", 1, 12, 13, 1)
end
- 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.
Finished Dungeons - complete mods to play
Post Reply