Garry's Mod

Garry's Mod

425 vurderinger
Combine Door Creator - E2 function (Wiremod) / Dupe-able / Customizable
   
Pris
Føj til foretrukne
Gjort til foretrukken
Fjern som foretrukken
Content Type: Addon
Addon Type: Tool
Addon Tags: Build, Roleplay
Filstørrelse:
Offentliggjort:
Opdateret:
1.678 KB
16. aug. 2014 kl. 4:25
21. sep. 2014 kl. 7:17
3 ændringsbemærkninger ( vis )

Abonner for at downloade
Combine Door Creator - E2 function (Wiremod) / Dupe-able / Customizable

Beskrivelse
Have you ever wanted to use the large Combine gates for your own base? Did you try serveral Door STools, only to figure out that it's impossible to dupe the prop_dynamic class?

That actually made me mad, so I figured out a way, to make this kind of doors dupeable. I created a new function for Wiremod Expression 2, that allows you to create doors. That way, you only have to dupe the E2 chip and it will re-create the doors wherever you want. The function also returns the created entity, for further use in the E2 code.

Although it's not the easiest or most comfortable method, it worked fine for me so far and I thought I share it, along with the Entity:fire() function I created to control these. Originally only created for the Combine gates, I thought it lacked enough features for a release and therefore I added the other prop_dynamic gates from HL2 and the prop_rotating Doors. I also added the ability to set (almost) all flags someone could set in Hammer. Futhermore, the spawning is undo-able.


This is an Wiremod E2 extension. Therefore it requires Wiremod!


Version 1.2: Changelog


Combine Gates and other prop_dynamic doors:
doorCombineCreate([string] name, [number] model, [vector] position, [number] rotation)

name - Enter a (unique) name for the entity. Useful for the findByName() function.
Example: "MyDoor"
model - Number of the model you want to use. Must be one of these or it will not work:
1 - Combine Door - Tall
2 - Combine Gate - Citizen
3 - Combine Gate - Vehicle
4 - Dr. Kleiner's lab blast door
5 - Elevator door
6 - Mining elevator door (Requires HL2 EP2)
7 - Garage door (Requires HL2 EP2)
position - Vector of the position, where you want the door to spawn (ground position!).
Easiest way: Use entity():pos() to spawn the door where the E2 chip is placed. Be sure to place it on the ground.
rotation - Rotation of the door, this is always relative to world. Enter a number from 0 to 359. Recommended to use 0, 45, 90, 135, 180, 225, 270 or 315.

Example:
E = doorCombineCreate("CombineDoor", 1, entity():pos(), 180)
Spawns a tall combine door named "CombineDoor" at the position of the E2 chip with a rotation of 180°. Saves the created entity under variable E.


Rotating / normal doors (prop_door_rotating)
doorRotatingCreate([string] name, [number] model, [number] skin, [number] hardware, [vector] position, [number] rotation) doorRotatingCreate([string] name, [string] path, [number] skin, [number] hardware, [vector] position, [number] rotation) doorRotatingCreate([string] name, [number] model, [number] skin, [number] hardware, [number] locked, [number] no_use, [number] silent, [vector] position, [number] rotation) doorRotatingCreate([string] name, [string] path, [number] skin, [number] hardware, [number] locked, [number] no_use, [number] silent, [vector] position, [number] rotation)

name - Enter a (unique) name for the entity. Useful for the findByName() function.
model OR path - Enter either one of the model numbers from below OR the path to an own door model (must be compatible with prop_door_rotating!).
1 - standard door - (Skins: 0-12 / Hardware: 0-3)
2 - metal door with hole - (Skins: don't work / Hardware: 0-2)
3 - small door (to be used as double door) - (Skins: 0-1 / Hardware: 0-1)
4 - industrial door with window (Skins: 0-1 / Hardware: 0-3) - Requires HL2 EP1
5 - fence gate (Skins: 0 / Hardware: 0) - Requires HL2 EP2
"models/mycustomdoor/example.mdl" - Your own path to a compatible door.
skin - Choose a skin from 0 to the highest number (look under models). Doesn't work with door no. 2, choose 0 there.
hardware - Choose the type of lever for the door. Look under models, which are compatible.
0 - No lever
1 - normal lever
2 - pushbar
3 - keypad (this is not an actual working keypad)
locked (optional) - If set to 1, door will be locked on spawn. Default: 0
no_use (optional) - If set to 1, door can NOT be opened by pressing use on it. You must fire the inputs "open" / "close" to interact with the door. Default: 0
silent (optional) - If set to 1, door will make no sound when opening / closing and does not alert NPCs. If set to 2, door makes sound but does not alert NPCs. Alerting of NPCs doesn't seem to have an effect in Garry's Mod. Default: 0
position - Vector of the position, where you want the door to spawn (ground position!).
Easiest way: Use entity():pos() to spawn the door where the E2 chip is placed. Be sure to place it on the ground.
rotation - Rotation of the door, this is always relative to world. Enter a number from 0 to 359. Recommended to use 0, 45, 90, 135, 180, 225, 270 or 315.

Example:
E = doorRotatingCreate("MyDoor", 1, 5, 2, 1, 0, 0, vec(250,100,0), 90)
Spawns a door named "MyDoor" with with normal model [1] skin no. 5 [5] and a pushbar [2], that is locked [1], useable [0] and makes sound [0] at coordinates X:250, Y:100, Z:0 with 90° rotation. Saves the created entity under variable E.


Populære diskussioner Vis alle (1)
14
17. okt. 2020 kl. 20:39
FASTGJORT: FAQs
LibertyForce
71 kommentarer
RationDeduction 30. aug. kl. 4:55 
make a full tutorial on each door and how to set it up
Paleo-mem 15. sep. 2024 kl. 1:43 
what does it mean?
] doorCombineCreate([container_gate] name, [2] model, [entity():pos()] position, [0] rotation)
Unknown command: doorCombineCreate
Got Subscription details!
Addons have changes - remounting
Unmounting (addon unsubscribed) 'cache/workshop/407030840.gma'
Addons have changes - remounting
⛔Elliot#658⛔ 18. apr. 2024 kl. 0:04 
and how to use this mod?
Lexeychik 17. apr. 2024 kl. 3:57 
Too hard to use, there are doors in Wiremod extras. Both of your addon and the extras doors in wiremod do not work on saves!
Nikitza Inc 29. dec. 2023 kl. 10:45 
You saved my day, thank you!
Benevolence 20. dec. 2023 kl. 13:03 
Well at least I know what this does now.
Weyland-Yutani Contractor 27. okt. 2023 kl. 18:16 
all of this just to get a stupid door? jesus christ.
VerionFX 1. sep. 2023 kl. 11:18 
Can you add Portal 2 Doors?
unlikeaboss 31. aug. 2023 kl. 8:04 
is there a mod that does this without E2? (i cant be bothered learning to code)
Benevolence 16. apr. 2023 kl. 0:47 
Nevermind, looked at it, not expecting to get ripped off.