TK_Effect - golden-coconut-studio/TikiAdventuresWiki GitHub Wiki
TK_Effect is part of the ability system, and decides who the skill should affect. Basically, when a skill is cast by an actor, the AbilitySkill decides if it should fire, and if it does, it calls an effect. These effects will then run the behavior, or in other words, the actual skill, by deciding who it is going to run the behavior on. In short, the effect chooses and runs behaviors on actors.
To do this, it the same query system as the ability skill (NOTE: Please Read Ability skill first, there, the query system is explained in detail).
Below is a compilation off all the variables that make up the ability effect, with their explanations.
Instant Changes to Stats If the effect's query succeeds, the affected characters will have their stats altered in an instant by these variables. This way we can do simple things like damaging, or changing a stat, without the need of a behavior.
Damage Amount: This allows us to deal damage to the affected character instantly, assuming they have a
healthcare component.
Heal Amount: This allows us to restore health of the affected character instantly, assuming they have a
healthcare component.
Character Properties: This is an instant alterator to specific TK_CharacterBase, TK_Enemy and TK_Player variables.
Filling these out Adds (or subtracts, if the value is negative) the given amount to the
filled out variable. Note that if it's a variable that does not belong to said character (for
example, modifying armor on a tiki), it will do nothing.
IMPORTANT: you should almost NEVER use these, they are only here for when you have no other
way of changing a stat. Also note that once you alter a stat through here, the change will
remain, until you reset the stat back to its original value somewhere.
Spawn Object effects have the ability to instantly spawn blueprints. This is very useful for when creating abilities that spawn blueprints with their own functionality, such as simple bullets, or projectiles. All the actors that pass the query system will spawn all the objects that you've defined.
Objects to Spawn: This is an array of blueprints that you want to spawn on the affected actors. It has a couple
Of properties to influence its transform.
Direction to spawn: decides what the initial rotation will be relative to the actor rotation it
spawns from.
Distance to spawn: decides how far from the initial spawn location the object spawns from
Angle to spawn: rotates the spawned actor by adding the given values.
Scale to spawn: sets the scale of the spawned actor.
Time to spawn: a delay in seconds before the object spawns.
To Spawn: the object that should be spawned.
Attach to Actor: Decides if the spawned actor should be attached to the actor it spawns from.
Query System this works very much like the query system from the Ability Skill (please read that first).
It has a few differences though.
First off, there is an 'Offset Spawn', which gives the collision detection query an offset position from where it will spawn from.
Then, instead of calling an effect(s) through the query, it calls a behavior instead.
Lastly, the main difference is that it won't run this query to see if it can run the behavior, but rather, to affect every single character detected in the collision that matches the Query conditions. This way you can apply behaviors to each of those characters.
Also, one last thing the effect has. In case you want to do something instant, rather than over time in a behavior, the effect has its own custom blueprint event: