Garry's Mod

Garry's Mod

613 ratings
Dragonred: Dynamic Triggers [v0.15] [New Update ( Interactables )]
3
4
4
3
4
2
3
3
2
2
2
2
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Tool
Addon Tags: Build, Roleplay
File Size
Posted
Updated
818.505 KB
26 Feb @ 7:25pm
13 Apr @ 7:29am
9 Change Notes ( view )

Subscribe to download
Dragonred: Dynamic Triggers [v0.15] [New Update ( Interactables )]

Description
v0.15 Update - Interactable Triggers Update


This Update was Possible thanks to Reaps, Which thanks to Their donation of 120$ I was able to Pay my electricity bill and therefore have more time to work on this, Huge props to them and i cannot thank them enough!

The v0.15 Update brings a new Entity and Trigger to the Mod = Interactables! Which have the same branch and commands systems of the Triggers, but instead of being a Trigger box, it's a Customizable Interactable Object which has full working Physics and can be wielded and applied to many different Situations

Also now you can make the Triggers have Randomized Results with the new 'Random' type on Set Variables Commands.

The Interactables become Deactivated once a Player interacts with them, and a player can interact with them by Pressing the [USE] Key on them ( Usually [E]. ), Just like Triggers, the Interactables Save their commands and branches. And Also their Constraints and Physical states, such as = Welds and if it's Frozen by Physgun or not.

The Interactables have 3 Trigger modes =

Single Press: Activates Instantly the Moment a Player Presses the [USE] Key at them.
Hold: Players must hold the [USE] Key for a defined time in order to interact with the object, if the Player stops holding the Use key and there are no other players interacting with it, the Interaction Progress Resets back to 0, The Interactor will be considered the most recent player who was last interacting with the Object.
Hold No-Reset: Just like Hold but without reseting the Progress if all players stop interacting with the object.

Multiple Players interacting with 1 Interactable will Make the Interaction Faster! You can Define how many Players you want to be able to Interact with it.

Besides Interactables, This Update also brings new Commands: URL Commands to be able to Play URL Sound Files ( Requested by Reaps friends ) , give/set Health/Armor, and small Quality of Life Changes, such as Default Weapons Option for NPCS and Clone NPCS In NPC Spawn commands.

What is This Mod



This Mod Introduces the Dynamic Trigger Tool, which allows you to create and modify Custom Triggers with which you can do multiple things and many possibilities, Allowing you to create something way more dynamic for a GMOD Save which Usually wouldn't have too much Utility.

The functionability of this mod is similar to how Event Triggers work in RPG Maker, which some Commands ( such as Showing the Text Box ) can be yielded before continuing to execute the rest of the Commands in the Branch of the Event, However this Mod allows you to have many multiple Branches in 1 Trigger and allows you to fully Dynamically Develop them.

Warning:
If you Are using any Mods that changes how the Networking Library of GMOD Works, it might affect the mod, therefore i can't do anything about it.

If you Get Stuck in an Infinite Loop you accidentally got yourself stuck in or any Player in your server Did, as an Admin, Use the server Command: dragonred_dynamictriggers_stopexecutions. It will stop the Execution of all Trigger Commands for a Whole Second.

How to Use It?


In the Tools Tab, you will find a new Category Called 'Dragonred: Dynamic Tools' and Inside of it a Tool called 'Dynamic Trigger Tool'.

If you wish to see an Example of the Possibilities you can Achieve with the Mod and have an idea of how the system Works, On the Screenshots Showcase of this Addon there will be 3 Videos, 1 of them being a Small Custom Campaign Example and the Other 2 Small tutorials (Elevator and Kill-All Enemies to Proceed Segment ).

Full GMOD-Saves Compatibility


The Main Intention of this Mod, is to give GMOD Saves a whole New Functionability, which is being able to make your own Campaigns through the Usage of the System, Below i will leave a Link to a Quick Example i Made, which is a Small Campaign Example done only with my Dynamic Triggers System, Feel Free to Use the Tool after playing through the Campaign to have a deeper understanding of how you should Setup your Triggers ( don't forget to check Triggers Settings Too! )

My Example Campaign:

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3435177289

Branches and Commands


The way it works is that once a Player Triggers a Trigger, they will start an Async method/Coroutine, which will then execute all of the Commanda Asynchronously, Allowing you to make Pauses in Between the execution of the Commands.

The Multiple Branches are Available so you can Switch between them through a Conditional Branch using custom Variables you can se on Entities or for example, 'using the Show Texbox with Options' and Selecting a Result Branch for the Players upon Selecting a Choice.

Each Player will have their Own Async method upon Triggering, and the player CANNOT Execute the Same Trigger again until their Execution of Commands of that Trigger Finishes, But Also the Trigger Type must be Considered.

Trigger Types



There are Multiple Trigger Types, Each one of them Behaving Differently:

  • Single: Activates 1 Time Everytime the Player goes in the Trigger when they are not already executing that trigger's Branches of Commands.

  • Once: Activates 1 Time For Each Player and then does NOT Activate for that PlayerAnymore.

  • Once Per Exit: Activates 1 Time but Only when there isn't a Player inside the Trigger Zone or Executing the Commands of that Trigger Already, if there is, All players will not be Able to interact with the Trigger.

  • Multiple: Activates Multiple times as long as the Player is Inside the Trigger Zone, but it Still Waits for the Execution of Commands to finish to then re-Execute the Commands Again.

  • Only One: Activates only 1 Time for 1 Player and then Automatically Deactivates Itself, making it Not-Interactable Anymore ( Could have been Easily Done through Commands, but added this because why not. )

If you Wish to clear all The Players who Have Entered the Trigger so they Can Interact with it Again, click on the 'Clear Entities That Triggered' Button.

Editable Convars


These are the Convars you can Edit through the Console, Server Convars being Convars only Editable by Admin/Host, Client ones being Editable by the Clients in their Game.

dragon_dynamictriggers_allowphysgunpickup ( 0 / 1 )
dragon_dynamictriggers_constantlyupdateentitydata( 0 / 1)
dragon_dynamictriggers_onlyadminscanusetriggertools( 0 / 1)
dragon_dynamictriggers_textbox_allowquickread( 0 / 1 )
dragon_dynamictriggers_textbox_allowskip( 0 / 1 )

Due to Steam's Description Limit, I Cannot Show them All here, To see the Rest just check all Variables that start with: dragon_dynamictriggers

My Patreon


As Mentioned before, i will continue this Project if i see that people are really liking it and Supporting me on Patreon, it took me a lot of time to complete the v0.1 of this Project and it would take me even more Months to fully add all new Ideas and Updates, so it really wouldn't be smart for me to spend even more time Working on it if people wouldn't even care about the Project.

If you wish to see this mod receive more Updates, See more Addons like this, Suggest new Ideas of what to Add to it or even new Addon Ideas you'd want to see me Make, Please consider Subscribing to my Patreon:

patreon.com/dragon_red_dnp

All my Codes are Done from Scratch without the Help of A.I or using the Code of Other developers, I DO NOT Give permission for anyone else to publish this mod besides Me nor Stealing the Code of it.
Popular Discussions View All (5)
45
28 May @ 12:20pm
Bugs and Errors (best to leave one here in case)
Blargh Hurek
22
10 May @ 8:09am
PINNED: Custom Campaigns Here
Dragonred
2
1 Mar @ 7:13am
Support for languages other than English is missing
Невидимый
129 Comments
zac bro 10 Jul @ 5:58am 
when I make saves, almost every entity gets reset and I have to manually re-assign them. For anything from 'Set Entity Position' to 'Entity Emit Sound'. I don't know what I'm doing wrong
zac bro 9 Jul @ 12:51pm 
is it possible to make a trigger execute a console command? would be perfect.
Gordon Freeman 4 Jul @ 11:36am 
please let us make bigger texts in the choice in "textbox with options"
Ёжик 20 Jun @ 2:59am 
make it so we can change interactables position/angle with commands
_harbii_ 12 Jun @ 12:34pm 
how to change npc models? i tried to change them through PM but npc just stand in t-poses
SalaaMohamed05 7 Jun @ 2:25pm 
it not added but hope next major update is goat
_harbii_ 7 Jun @ 2:25pm 
is there a trigger in the mod that executes commands in the console? if not, could you add it in the next update
Norilsk_top 2 Jun @ 8:43am 
does the trigger not work when you are in transport?
Notispadiko 29 May @ 7:44am 
this mod is great, I am making my own campaing rn
SalaaMohamed05 23 May @ 5:03am 
sadly no but i think next major or normal update will add it