-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lua #2043
base: master
Are you sure you want to change the base?
Lua #2043
Conversation
Hello @PieterVdc, what is this PR? It adds Lua scripting to KeeperFX instead of its own scripting language? |
not as a replacement, but yeah as a second level script, still in early stage, but on the discord I uploaded a sample map that uses it |
Why you have to bring |
indeed, but I started with just a quick draft test to get a quick idea of what would be needed, before doing it proper |
This reverts commit cd2b5f0.
@@ -112,8 +114,6 @@ function TriggerRegisterThingEvent(trigger, thing, thingEvent) | |||
return event | |||
end | |||
|
|||
-- Trigger variables | |||
|
|||
--- Gets the unit associated with the current triggering event | |||
--- @return Thing|nil | |||
function GetTriggeringThing() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is bad as a concept.
Just pass things from On...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's based on the wc3 script, this way allows multiple events to trigger the same action, so can't know the exact params without having a fixed action that triggers it
Game.triggers = {} | ||
end | ||
local trigger = { events = {} } | ||
function CreateTrigger(name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not
CreateTrigger(name, conditions, actions)
with or {}
for optionals
not final yet, but works, will probably use code as a dependency instead, but for now it uses a precompiled dll