destroying buttons

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
User avatar
Fhizban
Posts: 68
Joined: Sun Oct 21, 2012 2:57 pm
Location: Germany
Contact:

destroying buttons

Post by Fhizban »

hey its me and my noob questions again

i want to destroy certain dungeon objects when the dungeon loads and wonder if this is possible

right now i have a series of dungeon_secret_button_small and when starting i use a script entity to select a few of them and remove them via button:destroy()

well, this leaves a ugly gap in the wall. is there another way?
--
Fhizban's Asset Repository - the place where you find all my LoG contributions:
viewtopic.php?f=14&t=3904
Periodiko
Posts: 19
Joined: Fri Oct 19, 2012 2:45 am

Re: destroying buttons

Post by Periodiko »

A number of objects, including buttons, replace the walls their placed on. This has the consequence of meaning that if you delete them, there will be a huge gap. You simply need to spawn a new object in to replace the gap. The easiest way would be to place a closed secret_door there. Alternately, you can create an object that has the same model as a standard wall and spawn it to replace the gap; look at the wall_drainage entries for an example. Keep in mind that the standard wall objects only have one visible side, so you need to spawn it with the correct facing. Secret doors, on the other hand, are visible on both sides.
User avatar
msyblade
Posts: 792
Joined: Fri Oct 12, 2012 4:40 am
Location: New Mexico, USA
Contact:

Re: destroying buttons

Post by msyblade »

You also may be able to define a new secret button and change replaces wall to false,then (maybe) when its removed the original wall will be there
Currently conspiring with many modders on the "Legends of the Northern Realms"project.

"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
User avatar
Fhizban
Posts: 68
Joined: Sun Oct 21, 2012 2:57 pm
Location: Germany
Contact:

Re: destroying buttons

Post by Fhizban »

Thanks, I am one big step closer to script a random dungeon generator now!

1. replaces wall = false , does not work - leave it as "true"
2. place all secret buttons in the level
3. when the game starts, scan all secret buttons according to your maze generator
4. save their location etc. - call secret_button.destroy()
5. then spawn a "dungeon_secret_door" with the saved location etc.

so, every time the dungeon map is startet - all secret doors, buttons and whatelse appear at different locations.

cool stuff!
--
Fhizban's Asset Repository - the place where you find all my LoG contributions:
viewtopic.php?f=14&t=3904
Post Reply