MappingHell

Games => Red Eclipse => Tutorials => Topic started by: unixfreak on May 21, 2013, 08:24:36 PM

Title: Trigger activated doors
Post by: unixfreak on May 21, 2013, 08:24:36 PM
Start by adding a new mapmodel entity
/newent mapmodel

(http://imgur.com/TcdiPuOs.png) (http://imgur.com/TcdiPuO.png)

Press and hold "1" and scroll through until you find the door model you want. As of RE 1.4, there are 2 mapmodels which have door/opening animations. They are type: 8 and type: 9.

Next up, you want to add a new trigger entity
/newent trigger

(http://i.imgur.com/mXWuGdEs.png) (http://i.imgur.com/mXWuGdE.png)


While the trigger is selected, add the mapmodel to the selection
/entfind mapmodel 9

(http://i.imgur.com/HliBx9rs.png) (http://i.imgur.com/HliBx9r.png)

Press "L" whilst both entities are selected to link them.

(http://i.imgur.com/tjdFFHHs.png) (http://i.imgur.com/tjdFFHH.png)

These are several methods to open the doors, the first one being proximity (they open automatically as you cross the radius on the trigger entity). To get this working, set "action" to 1.

(http://i.imgur.com/x8p3QbOs.png) (http://i.imgur.com/x8p3QbO.png)

You might also want to set "type" to 1, so that it reads "link, proximity, off". This stops the door repeatedly opening/closing (spammy) while you are standing in the radius.

By setting "action" to 2, you can make the doors open by pressing "E" to interact with the trigger. Useful for having a computer console or a keypad which opens the door.

(http://i.imgur.com/nB38diOs.png) (http://i.imgur.com/nB38diO.png) (http://i.imgur.com/a1IqZVfs.png) (http://i.imgur.com/a1IqZVf.png)

By changing the "state" parameter of the trigger, this makes it decide if the door defaults to being open or closed when the map is first loaded.

To make things more interesting, you can also link a sound to the same trigger, so that when the door is opened or closed, a sound effect is played.

To do this, add a new sound entity, and find the sound that you want to use
/newent sound

A good choice for doors is 'sounds/ambience/switch' (type: 25)

Select the sound entity, and also the trigger entity
/entfind trigger

Finally, press "L" to link the trigger to the sound entity, and you should get a setup similar to this:

(http://imgur.com/4ADAmNDs.png) (http://imgur.com/4ADAmND.png)

You should now have a fully functioning door with sound fx,
Title: Re: Trigger activated doors
Post by: vampirefrog on May 21, 2013, 08:28:48 PM
Does this work in coop?
Title: Re: Trigger activated doors
Post by: unixfreak on May 21, 2013, 09:00:04 PM
Yes  :D
They work in all multiplayer modes.