<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.frozenbyte.com/index.php?action=history&amp;feed=atom&amp;title=Gameplay_Events</id>
	<title>Gameplay Events - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.frozenbyte.com/index.php?action=history&amp;feed=atom&amp;title=Gameplay_Events"/>
	<link rel="alternate" type="text/html" href="https://wiki.frozenbyte.com/index.php?title=Gameplay_Events&amp;action=history"/>
	<updated>2026-04-24T11:11:00Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://wiki.frozenbyte.com/index.php?title=Gameplay_Events&amp;diff=271&amp;oldid=prev</id>
		<title>AnteroFB: Created page with &quot;= Gameplay Events =  &#039;&#039;&#039;Note&#039;&#039;&#039; : This article handles a complex topic, thus the instructions might not be really clear and coherent, any help or contribution to this page is...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.frozenbyte.com/index.php?title=Gameplay_Events&amp;diff=271&amp;oldid=prev"/>
		<updated>2018-06-15T08:11:36Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= Gameplay Events =  &amp;#039;&amp;#039;&amp;#039;Note&amp;#039;&amp;#039;&amp;#039; : This article handles a complex topic, thus the instructions might not be really clear and coherent, any help or contribution to this page is...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Gameplay Events =&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note&amp;#039;&amp;#039;&amp;#039; : This article handles a complex topic, thus the instructions might not be really clear and coherent, any help or contribution to this page is welcome.&lt;br /&gt;
&lt;br /&gt;
Let&amp;#039;s call gameplay events everything that isn&amp;#039;t static. In most cases, background is static, lighting is static, objects are staticaly placed on the scene. Dynamically generated content is, for instance, spawning monsters, triggering an animation when entering an area, starting a specific lighting after some time, ... Anything that will happen or not depending on time, player action, variables, etc.&lt;br /&gt;
&lt;br /&gt;
This page aims at showing you the easiest ways to trigger the easiest events, which can be a good start to spice up your mods.&lt;br /&gt;
&lt;br /&gt;
The entities described below are separated into two categories: Collectors and Triggers. Actually, they both list entities that can be actived, and be part of a chain of events. The difference we make here is that Collector entities will most of the time be the initial trigger in the chain (an area, a timer, a lever, ...) whereas Trigger will be activated by a Collector and then take effect on something (an object, a variable).&lt;br /&gt;
&lt;br /&gt;
= Collectors =&lt;br /&gt;
&lt;br /&gt;
A Collector is an entity that will start a chain of events, for example when the player enters an area, or basically when anything happens. When activated, a collector will send a signal to designated triggers (or even other activate other collector).&lt;br /&gt;
&lt;br /&gt;
== PlayerBoxCollectorArea ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;PlayerBoxCollectorArea&amp;#039;&amp;#039;&amp;#039; is an entity that can be found under the &amp;#039;&amp;#039;&amp;#039;AreaEntity&amp;#039;&amp;#039;&amp;#039; -&amp;gt; &amp;#039;&amp;#039;&amp;#039;CollectorArea&amp;#039;&amp;#039;&amp;#039; -&amp;gt; &amp;#039;&amp;#039;&amp;#039;BoxCollectorArea&amp;#039;&amp;#039;&amp;#039; tree.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Activated by:&amp;#039;&amp;#039; When the player enters a specific area.&lt;br /&gt;
&lt;br /&gt;
Change the &amp;#039;&amp;#039;Dimensions&amp;#039;&amp;#039; of the &amp;#039;&amp;#039;&amp;#039;BoxAreaComponent&amp;#039;&amp;#039;&amp;#039; in the panel &amp;quot;Properties&amp;quot; to suit your needs.&lt;br /&gt;
&lt;br /&gt;
The only other property component you should care about for a basic use of this is the &amp;#039;&amp;#039;&amp;#039;TriggerOtherInstancesComponent&amp;#039;&amp;#039;&amp;#039;. It is detailed in the &amp;#039;&amp;#039;&amp;#039;TriggerMultipleOthersEntity&amp;#039;&amp;#039;&amp;#039; section below.&lt;br /&gt;
&lt;br /&gt;
== AIBoxCollectorArea ==&lt;br /&gt;
&lt;br /&gt;
Same as &amp;#039;&amp;#039;&amp;#039;PlayerBoxCollectorArea&amp;#039;&amp;#039;&amp;#039; but will be activated when an AI enters the area.&lt;br /&gt;
&lt;br /&gt;
== Timers ==&lt;br /&gt;
&lt;br /&gt;
TODO Coming soon.&lt;br /&gt;
&lt;br /&gt;
== Levers ==&lt;br /&gt;
&lt;br /&gt;
Levers can be found under the &amp;#039;&amp;#039;&amp;#039;GameplayEntity&amp;#039;&amp;#039;&amp;#039; -&amp;gt; &amp;#039;&amp;#039;&amp;#039;ItemGameplay&amp;#039;&amp;#039;&amp;#039; -&amp;gt; &amp;#039;&amp;#039;&amp;#039;UsableItem&amp;#039;&amp;#039;&amp;#039; -&amp;gt; &amp;#039;&amp;#039;&amp;#039;LeverUsableItem&amp;#039;&amp;#039;&amp;#039; tree. Let&amp;#039;s use for this example a &amp;#039;&amp;#039;&amp;#039;SewersPhysicsLeverusableItem&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Activated by:&amp;#039;&amp;#039; Player.&lt;br /&gt;
&lt;br /&gt;
=== TrinePhysicsLeverComponent&amp;#039;s properties ===&lt;br /&gt;
* &amp;#039;&amp;#039;Enabled&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;#039;&amp;#039;CanBeReused&amp;#039;&amp;#039; - In case you want your lever to open AND close a door&lt;br /&gt;
* &amp;#039;&amp;#039;OnUseRateVelocity&amp;#039;&amp;#039; - The speed at which the lever turns (i.e. the ease)&lt;br /&gt;
* &amp;#039;&amp;#039;TriggeringAngle&amp;#039;&amp;#039; - Angle at which the lever will activate, in degrees. 0 is pointing up&lt;br /&gt;
* &amp;#039;&amp;#039;StartPositionLeft&amp;#039;&amp;#039; - Reverses the lever so it works from left to right&lt;br /&gt;
* &amp;#039;&amp;#039;LockToEndPosition&amp;#039;&amp;#039; - Once the lever has been activated, it doesn&amp;#039;t come back to its position&lt;br /&gt;
* &amp;#039;&amp;#039;TriggerOnBothEnds&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;#039;&amp;#039;TriggerOnlyOnce&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;#039;&amp;#039;OriginalRotationLimitLowAngle&amp;#039;&amp;#039; - The rotation of the lever the player will find when they arrive&lt;br /&gt;
* &amp;#039;&amp;#039;OriginalRotationLimitHighAngle&amp;#039;&amp;#039; - The maximum rotation you can pull the lever. Be careful that &amp;#039;&amp;#039;TriggeringAngle&amp;#039;&amp;#039; is less&lt;br /&gt;
* &amp;#039;&amp;#039;ReturnToStartRotationDriveVelocity&amp;#039;&amp;#039; - The speed at which the lever comes back to its original angle if the player lets go&lt;br /&gt;
* &amp;#039;&amp;#039;ReturnToStartVelocityWhenUsingButNotMoving&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;#039;&amp;#039;TurningAcceleration&amp;#039;&amp;#039; - Rate at which the player accelerates when using the lever (ease-in factor)&lt;br /&gt;
&lt;br /&gt;
To propagate the event to a trigger, set the &amp;#039;&amp;#039;&amp;#039;TriggerOtherInstancesComponent&amp;#039;&amp;#039;&amp;#039; accordingly. It is detailed in the &amp;#039;&amp;#039;&amp;#039;TriggerMultipleOthersEntity&amp;#039;&amp;#039;&amp;#039; section below.&lt;br /&gt;
&lt;br /&gt;
= Triggers =&lt;br /&gt;
&lt;br /&gt;
== TriggerMultipleOthersEntity ==&lt;br /&gt;
&lt;br /&gt;
This trigger allows you to propagate a trigger event to multiple other activable entities. It only contains a &amp;#039;&amp;#039;&amp;#039;TriggerOtherInstancesComponent&amp;#039;&amp;#039;&amp;#039; as component, that will propagate the event to a list of activable entities.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Activated by:&amp;#039;&amp;#039;&amp;#039; another Collector / Trigger.&lt;br /&gt;
&lt;br /&gt;
=== TriggerOtherInstancesComponent&amp;#039;s properties ===&lt;br /&gt;
* &amp;#039;&amp;#039;AllowTrigger&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;#039;&amp;#039;AllowUnTrigger&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;#039;&amp;#039;NegateInput&amp;#039;&amp;#039; - Will negate the input before forwarding it. If the goal is to maintain a door closed until the player arrives, the output should be always &amp;#039;&amp;#039;true&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039;except&amp;#039;&amp;#039;&amp;#039; when the entity is triggered. This can be done by reversing the input&lt;br /&gt;
* &amp;#039;&amp;#039;NegateOutput&amp;#039;&amp;#039; - The same as NegateInput but happens later in the process. Enabling those two is equivalent to doing nothing&lt;br /&gt;
* &amp;#039;&amp;#039;OtherInstances&amp;#039;&amp;#039; - A list of instances to propagate the trigger to (i.e. activate them). They can be Triggers but Collectors aswell. To add an instance to the list, click the &amp;quot;+&amp;quot; sign, and look for (or paste) a object or component&amp;#039;s GUID. Some activable instances are components, thus not listed in the &amp;quot;All Objects&amp;quot; list, so you&amp;#039;ll have to paste their GUID&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== BreakTriggerEntity ==&lt;br /&gt;
[[File:Breaktriggerexample.jpg|200px|thumb|right|A lever triggering a wall break]]&lt;br /&gt;
Can be found under the &amp;#039;&amp;#039;&amp;#039;TriggerEntity&amp;#039;&amp;#039;&amp;#039; tree.&lt;br /&gt;
Will break breakable things. For instance walls that are usually broken with the warrior&amp;#039;s hammer.&lt;br /&gt;
&lt;br /&gt;
=== BreakTriggerComponent&amp;#039;s properties ===&lt;br /&gt;
* &amp;#039;&amp;#039;InstancesToBreak&amp;#039;&amp;#039; - a list of breakable objects to propagate the trigger to. Add an entry using the &amp;quot;+&amp;quot; sign and select your object in the &amp;quot;...&amp;quot; list&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note&amp;#039;&amp;#039;&amp;#039; : if you don&amp;#039;t want the player to be able to mash the item but want only the trigger to do it, check the &amp;#039;&amp;#039;Immortal&amp;#039;&amp;#039; property of the &amp;#039;&amp;#039;&amp;#039;TrineHealthComponent&amp;#039;&amp;#039;&amp;#039; of the breakable object.&lt;br /&gt;
&lt;br /&gt;
== DeleteTriggerEntity ==&lt;br /&gt;
&lt;br /&gt;
Can be found under the &amp;#039;&amp;#039;&amp;#039;TriggerEntity&amp;#039;&amp;#039;&amp;#039; tree.&lt;br /&gt;
Will delete any instance without any animation.&lt;br /&gt;
&lt;br /&gt;
=== DeleteTriggerComponent&amp;#039;s properties ===&lt;br /&gt;
* &amp;#039;&amp;#039;InstancesToDelete&amp;#039;&amp;#039; - a list of objects to delete. Add an entry using the &amp;quot;+&amp;quot; sign and select your object in the &amp;quot;...&amp;quot; list&lt;br /&gt;
&lt;br /&gt;
== TriggerToBoolPropertyEntity ==&lt;br /&gt;
&lt;br /&gt;
Can be found under the &amp;#039;&amp;#039;&amp;#039;TriggerEntity&amp;#039;&amp;#039;&amp;#039; tree.&lt;br /&gt;
When activated, sets a boolean variable.&lt;br /&gt;
&lt;br /&gt;
=== TriggerToBoolProperyComponent&amp;#039;s properties ===&lt;br /&gt;
* &amp;#039;&amp;#039;Values&amp;#039;&amp;#039; - A list of possible values for the variable. When the trigger is activated, the variable we take the value of the next element in the list, and so on (and loop). That way you can have 0 1 1 0 as a pattern, for example&lt;br /&gt;
* &amp;#039;&amp;#039;CurrentValueIndex&amp;#039;&amp;#039; - Do not touch - The index of the currently active value&lt;br /&gt;
* &amp;#039;&amp;#039;InitWithValue&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;#039;&amp;#039;InitValueIndex&amp;#039;&amp;#039; - The index of the first value to use&lt;br /&gt;
* &amp;#039;&amp;#039;OutBool&amp;#039;&amp;#039; - Do not touch - The output value. See &amp;quot;Listening on a variable&amp;quot; section.&lt;br /&gt;
&lt;br /&gt;
== TriggerToFloatPropertyEntity ==&lt;br /&gt;
Can be found under the &amp;#039;&amp;#039;&amp;#039;TriggerEntity&amp;#039;&amp;#039;&amp;#039; tree.&lt;br /&gt;
When activated, sets a float variable.&lt;br /&gt;
&lt;br /&gt;
See &amp;#039;&amp;#039;&amp;#039;TriggerToBoolPropertyEntity&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
== TriggerToIntPropertyEntity ==&lt;br /&gt;
Can be found under the &amp;#039;&amp;#039;&amp;#039;TriggerEntity&amp;#039;&amp;#039;&amp;#039; tree.&lt;br /&gt;
When activated, sets a int variable.&lt;br /&gt;
&lt;br /&gt;
See &amp;#039;&amp;#039;&amp;#039;TriggerToBoolPropertyEntity&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
== TriggerToRotationPropertyEntity ==&lt;br /&gt;
Can be found under the &amp;#039;&amp;#039;&amp;#039;TriggerEntity&amp;#039;&amp;#039;&amp;#039; tree.&lt;br /&gt;
When activated, sets a three dimensional variable.&lt;br /&gt;
&lt;br /&gt;
See &amp;#039;&amp;#039;&amp;#039;TriggerToBoolPropertyEntity&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
== TriggerToLuaCallEntity ==&lt;br /&gt;
&lt;br /&gt;
Will call a Lua Script.&lt;br /&gt;
&lt;br /&gt;
See [[Lua Scripts#TriggerToLuaCallEntity |Lua Scripts]]&lt;br /&gt;
&lt;br /&gt;
= Listening on an event / variable =&lt;br /&gt;
&lt;br /&gt;
Now that you have a trigger that changes values on a variable, you&amp;#039;d like to have your objects listen to it. Bascially any property can be linked to any trigger output variable, as long as they are of the same type (see [[Variable Types]]. This coul be useful to:&lt;br /&gt;
* Enable a timer (by liking its &amp;#039;&amp;#039;Enabled&amp;#039;&amp;#039; property to a boolean trigger)&lt;br /&gt;
* Start an animation&lt;br /&gt;
* Rotate an object&lt;br /&gt;
* Chain triggers&lt;br /&gt;
* Anything that relies on a variable&lt;br /&gt;
&lt;br /&gt;
Now, the following example includes a PlayerBoxCollectorArea, that triggers a TriggerToRotationEntity, that has two possible values ((0,0,0) and (0,0,90°)). We will now connect the Rotation output to an object&amp;#039;s &amp;#039;&amp;#039;Rotation&amp;#039;&amp;#039; property (that can be found in its &amp;#039;&amp;#039;&amp;#039;TransformComponent&amp;#039;&amp;#039;&amp;#039; component in the properties panel). What you should do is:&lt;br /&gt;
&lt;br /&gt;
* Get to the &amp;#039;&amp;#039;&amp;#039;TriggerToRotationPropertyComponent&amp;#039;&amp;#039;&amp;#039; properties panel&lt;br /&gt;
* Right click on the &amp;#039;&amp;#039;OutRotation&amp;#039;&amp;#039; property (note that it&amp;#039;s the same procedure with other triggers and types, except you will have names like &amp;#039;&amp;#039;OutBool&amp;#039;&amp;#039;, &amp;#039;&amp;#039;OutInt&amp;#039;&amp;#039;, &amp;#039;&amp;#039;OutValue&amp;#039;&amp;#039;, ...)&lt;br /&gt;
* Select &amp;quot;Select property as input&amp;quot;&lt;br /&gt;
* Go to the &amp;#039;&amp;#039;&amp;#039;TransformComponent&amp;#039;&amp;#039;&amp;#039; properties panel of the desired object&lt;br /&gt;
* Right click on the &amp;#039;&amp;#039;Rotation&amp;#039;&amp;#039; property&lt;br /&gt;
* Select &amp;quot;Connect input to this property directly&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You should now see a PropertyConnectionComponent appear, and, provided the BoxCollecterArea and the trigger are properly configured, an object that spins when you enter the area.&lt;br /&gt;
This procedure is the same for any property of any object.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:LeonardA-L|LeonardA-L]] ([[User talk:LeonardA-L|talk]]) 11:34, 7 March 2015 (UTC)&lt;/div&gt;</summary>
		<author><name>AnteroFB</name></author>
	</entry>
</feed>