Skip to content

EUD Tutorial: How to actually use EUD Editor 3's Trigger Editor

Ar3sgice edited this page Sep 24, 2020 · 6 revisions

Identifying the Root Problem

Many people have been complaining that the Trigger Editor for EUD Editor 3 is hard to use. Some of them even returned to EUD Editor 2 because of this.

Well, it is a workaround, but not if EUD Editor 2 doesn't work on my laptop.

There are three reasons EUD Editor 3 Trigger Editor is hard to use:

  • It's unfinished (apparently, since it's v0.11)
  • It's confusing (having an empty interface at the beginning)
  • It's untranslated (this is the biggest problem)

The Solution

I have translated some parts of EUD Editor 3's Trigger Editor. Mostly taken from SCMDraft or Google Translate.

I don't feel guilty for using Google Translate since I cannot read Korean anyways.

Unfortunately I cannot translate everything, but at least it could make things a little bit easier.

This is for version 0.11.0. It's probably a bad idea to translate when it's unfinished, but when it's finished they should have translated it themselves anyways.

https://ar3sgice.github.io/eudtools/Include/EUDEditor3_EngTranslation.zip

How to actually use the Trigger Editor

First, right click on the file list (don't click on settings) and choose Add -> [GUI] epScript File.

Go to Settings and set Settings Main File to the freshly added epScript file.

Disable ChatEvent and MSQC. They are probably going to fix it later, but in version 0.11.0 they are bugged and will crash the compilation process.

Go to the Func tab. The three options are

  • Add Function
  • Add Function Argument (only for Constructor type)
  • Add Function Return (only works for Constructor type)

Choose option 1, and it will pop up a prompt with 4 choices. The bottom field seem to have no effect.

  • onPluginStart: It only runs once when the map is loaded, somewhat like window.onload().
  • beforeTriggerExec: It runs once every time before any of the SCMD triggers are executed.
  • afterTriggerExec: It runs once every time after all of the SCMD triggers are executed.
  • constructor: It's a function you need to call it yourself.

Now this is another confusing part: it's separated into two parts, and you can add actions to the second part.

However, you cannot add conditions to the first part.

Actually the first part is function parameters (doesn't work unless it's a constructor). You need to use the "If" in Ctrl tab to write conditions.

Note that these triggers default to Preserve Trigger. You don't need to add them here.

Variables and Parameters

To define variables you need to go to the Object tab. The options are:

  • Define object;
  • Define variable.

Usually you'd want to define variable outside all functions to make them global. If you define them inside a function, they'll become local variables.

The four choices are

  • Variable;
  • Static variable;
  • Constant;
  • Object.

When choosing parameters, there are five options at bottom-left. These options are

  • Constant;
  • Variable;
  • Inline Expression;
  • Arithmetic;
  • Raw Code.

The actual parameter field is at top-right. "Number" is the data type which usually doesn't need to be changed.

There are also options under Variable and Inline Expression tabs but they are basically filters. Pretty easy to understand.

GUI and CUI

You can switch the epScript file to CUI mode to make it look more like real code.

There is an option to switch back, but I think it's broken at the moment.

A better approach might be to use different files in different modes: GUI for basic logic, CUI for complex functions.