Garry's Mod

Garry's Mod

404 beoordelingen
Control Map Entities - Entity:fire() E2 Function (Wiremod / ent_fire)
   
Prijs
Toevoegen aan favorieten
Toegevoegd aan favorieten
Verwijderen uit favorieten
Content Type: Addon
Addon Type: Tool
Addon Tags: Build, Roleplay
Bestandsgrootte
Geplaatst op
Bijgewerkt op
1.054 KB
13 aug 2014 om 2:06
20 apr 2017 om 12:00
6 wijzigingsnotities (weergeven)

Abonneren om te downloaden
Control Map Entities - Entity:fire() E2 Function (Wiremod / ent_fire)

In 1 verzameling van LibertyForce
Horror- & Story-Map Enhancements (Single- and Multiplayer Tools)
6 items
Omschrijving
This extension will add a new function to Expression 2 that allows you to fire an entity's input. It works much like the "ent_fire" console command, but without the need for "sv_cheats 1" and directly from within your E2 code.

Now you can easily control map entities:
  • Open, close, lock, unlock every door
  • Enable or disable thumpers, turrets and anything else that is compatible
  • Activate buttons without touching them or block them from being used
  • Start, stop, move forward / backward elevators and other things that use func_tracktrain.
  • Set keyvalues and spawnflags for entities.
All with wired buttons / events / or just anything you can think of (and build).


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


Syntax:
Entity:fire([string] input, [string] parameter)
Entity - a variable or function that returns the entity you want to manipulate
input - the entity's input that you want to fire (ex. "open")
parameter = optional: some inputs require additional parameter that you can send here

Entity:setKeyValue([string] keyvalue, [string/number] value)
Entity - a variable or function that returns the entity you want to manipulate
keyvalue - the keyvalue that you want to change (ex. "spawnflags")
value = the value that you want to set - either as number or string

entityMapID([number] id)
Returns entity that has given MapCreationID. Unlike entity(), it will always be the same on same map, no matter how much you clean up or restart it.
ID - the unique MapCreationID of the entity. Use the below function or Easy Entity Inspector to retrieve it.

Entity:getMapID()
Returns entity's MapCreationID. Only works on map entities.
Entity - a variable or function that returns the entity

Entity:getEntityName()
Returns the mapping name of this entity. Only works on (map) entities with an assigned name.
Entity - a variable or function that returns the entity


Example:
MyDoor:fire("lock") # This will lock the door that is assigned the variable "MyDoor". entityMapID(123):fire("kill") # This deletes the map entity with MapCreationID 123 from the map. Turret:setKeyValue("spawnflags",512) # Makes a floor turret friendly (like hacked by Alyx)


Multiplayer Notes:
  • This mod needs to be installed server-side! Clients don't need to install it and can still use the function.
  • This function does NOT allow to manipulate player entities (others or own).
  • Compatible with most Prop Protection addons: It uses the hook "CanProperty" to check if a player is allowed to manipulate an entity. If you don't have Prop Protection, all players are allowed to manipulate everything!
  • Prop Protection can be bypassed with the convar "wire_expression2_entfire_norestriction". If set to 1, it will allow all players to manipulate all entities, regardless of Prop Protection.


Click the following link for a guide that includes a list for inputs that you can fire and how you can get entities in E2. Beginners should read this! Do not ask questions answered in the FAQs.


>>> FAQ's / Documentation <<<

Other useful links:


Tags: wiremod wire expression 2 e2 chip developer input keyvalue key value entity map door combine turret elevator train open close lock unlock fire enable disable manipulate change
Populaire discussies Alles weergeven (3)
5
28 dec 2017 om 18:35
BELANGRIJK: Example E2 Codes
LibertyForce
5
21 aug om 13:42
BELANGRIJK: FAQs / Documentation
LibertyForce
2
20 nov 2015 om 10:13
E2 Hacker Buddy help
Sykken
29 opmerkingen
Badqualitysoupcan 16 okt om 9:18 
Once there was a little girl called Clarissa, she was ten-years-old and she lived in a mental hospital, because she killed her mom and her dad. She got so bad she went to kill all the staff in the hospital so the More- government decided that best idea was to get rid of her so they set up a special room to kill her, as humane as possible but it went wrong the machine they were using went wrong. And she sat there in agony for hours until she died. Now every week on the day of her death she returns to the person that reads this letter, on a monday night at 12:00a.m. She creeps into your room and kills you slowly, by cutting you and watching you bleed to death. Now send this to ten other profiles on this one site, and she will haunt someone else who doesn't. This isn't fake. apparently, if u copy and paste this to ten comments in the next ten minutes u will have the best of your life. TIC TOC. (I have to im held at gunpoint)
Diveryup 24 dec 2023 om 14:01 
how can i even use this i cant even find the thing
doofdrew 27 jul 2023 om 13:32 
how do i use this?
Intuitive 1 jul 2023 om 20:37 
I love this. Thank you!
YellowBanana4201 16 mei 2023 om 20:33 
Can it just allow buttons to be moved with the physgun?
YellowBanana4201 16 mei 2023 om 20:26 
Why do some of the buttons like the combine button point down when ever on a wall?
Benevolence 15 apr 2023 om 22:59 
I came across this too many times, because I had limited CPU\RAM, Now I might see this useful!:steamthumbsup:
{SWAG} Kyrator 6 mrt 2022 om 15:18 
toturial for thumplers please
SkullWagen 1 sep 2021 om 11:58 
Admincore adds support for e:entsetinput(s) as well as E:entsetkeyvalue(s)
Quite useful if you're looking for something more
Armystuntman 26 jun 2020 om 10:17 
Or even better, add a version identical to ent_fire's console command variant, which uses the entity map name instead of specifying each map ID individually? This would make it easier to fire multiple entities which have the same name.
Specifying every single ID is a little tedious.