Frequently Asked Questions - funovus/editor-wiki GitHub Wiki
Table of Contents |
The editor can sometimes fail to save if the Terrain Window crashes. You can usually close the Terrain Window (while keeping other windows like Data open) and try saving again.
The editor installation comes with a VS Code plugin for API reference and auto-completion for our Lua scripting system. Feel free to ignore this warning as it won't have any effect on the installation.
You can make the area search apply a behavior and add units with the behavior to a list, such as:
function OnUnitBehaviorAdd()
local u = DCEI.TriggeringUnit
local b = DCEI.TriggeringBehaviorName
local search_list = {}
local search_behavior = "MySearchBehavior"
if b = search_behavior then
-- add units with the behavior to the list
table.insert(search_list, u)
-- remove the behavior so it can be applied again
local stack_count = DCEI.GetUnitBehaviorStackCount(u, search_behavior)
DCEI.RemoveBehavior(u, search_behavior, stack_count)
end
end
DCEI.TriggerAddBehaviorAddEvent(DCEI.UnitAny, OnUnitBehaviorAdd)
There are a few reasons an ability may fail to cast:
- Check if the range is set
- Check if the arc is set and the caster is able to turn
- Check if the cost is set and the caster has required resources
If you've checked each of these and your ability still isn't working, let us know and we can take a look.
We often use the Launch Missile effect to create knockbacks. The typical data pattern is
- Create a launch missile effect and keep the Missile Unit as "None" (this will launch the effect target)
- Set the Launch Location to "Target Unit"
- Apply the launch missile effect to the unit you want to knock back
You can also use this pattern to create "jump"-like abilities (setting the Launch Location as "Source Unit").
Use a Set effect.