How to: Modify the World Editor's Trigger Editor

Sevion

The DIY Ninja
Reaction score
424
>null

Set variable to No "Whatever"

I.E.

Set UnitVar = No Unit

Or you can do it with custom script if there is no preset.

I don't want to go through EGUI and make no <everythings> though :(
 

SerraAvenger

Cuz I can
Reaction score
234
What would happen if I tell the WE to use functions I myself programmed?
In my map, it should just work fine, allright?
But once I try to open a map that doesn't have these functions, will it
a) give compilation errors (expected name)
b) crash (unknown function referenced)
c) act even different?

thanks in advance for your answer, Serra

EDIT:
I like your tutoriial, but I think it is not really straight. Could you please add a couple of titles for the chapters, like
Adding a function
Adding the function's Text
Adding a condition
Etc Etc....
 

Sevion

The DIY Ninja
Reaction score
424
If you use the functions in your map but the map doesn't have the functions in it, it will do a) give compilation errors (expected name)

Because it can't find the function so it will say "Expected A Function Here!! WHERE IS IT???"
 

SerraAvenger

Cuz I can
Reaction score
234
So actually, the WE won't check for function names, but gladly accept anything until the jass parser runs : )

Thank you!
 

Sevion

The DIY Ninja
Reaction score
424
If something is wrong in the UI files it will error something in the startup, but will still startup. But yes, what you said is true ;)

It's just like using regular (v)JASS.
 

Igor_Z

You can change this now in User CP.
Reaction score
61
Question:

1:
DestroyEffectBJ=0,effect
_DestroyEffectBJ_Defaults=GetLastCreatedEffectBJ
_DestroyEffectBJ_Category=TC_SPECIALEFFECT

2:
RemoveLocation=0,location
_RemoveLocation_Defaults=_
_RemoveLocation_Category=TC_My_Functions

Should i replace 1 with 2 or just add it above it?
 

SerraAvenger

Cuz I can
Reaction score
234
just add it.

If you want to keep 'TC_My_Functions' as the group, I also recommend going to the next

// XYZ actions

thingie,
add an

// My own actions

and then put the code directly between it.
 

Igor_Z

You can change this now in User CP.
Reaction score
61
Ok fixed that...

New problem: I get 2 errors when i start my editor. I don't know JASS so i don't know how to fix it :(. Can some 1 help me?

Error 1:
Trigger Database Error

[TriggerEvents] - TriggerRegisterTrackableHitEvent

Data section and text section have differing number of parameters (1, 0)

Error 2:
Trigger Database Error

[TriggerCalls] - CreateTrackable

Data section and text section have differing number of parameters (2, 0)
 

SerraAvenger

Cuz I can
Reaction score
234
You forgot to add the TriggerStrings stuff.
You basically told the WE what functions you'ld like to add, but you didn't tell it what to tell the user about these functions.
 

Sevion

The DIY Ninja
Reaction score
424
Before I forget, DON'T FORGET TO ADD TRIGGERSTRINGS! IT WON'T SHOW IF YOU DON'T HAVE THE RIGHT STRINGS TO DISPLAY!!!

;)

The reason I do this, is because it's explained how to do it above in the examples and I like to know that people reading my tutorial are actually learning something :)

Hence the point of Tutorial.

Yes?
 

SerraAvenger

Cuz I can
Reaction score
234
EDIT:
I like your tutoriial, but I think it is not really straight. Could you please add a couple of titles for the chapters, like
Adding a function
Adding the function's Text
Adding a condition
Etc Etc....

I think it is really hard to read the way it currently is...
But it helped me a lot : )

Perhaps like...

Code:
Editing the WE
 * Changing an Event
  - Editing the Event in the TriggerData.txt
  - Editing the Event in the TriggerStrings.txt
  - Reminders
 * Changing an Action
  - Editing the Action in the TriggerData.txt
  - Editing the Action in the TriggerStrings.txt
  - Reminders
 * Changing a Condition
  - Editing the Condition in the TriggerData.txt
  - Editing the Condition in the TriggerStrings.txt
  - Reminders
Extending the WE
 * Adding an Action Group
  - Adding the Action Group in the TriggerString.txt (?)
  - Using the Group
  - Reminders
 * Adding an Action
  - Adding the Action in the TriggerData.txt
  - Adding the Action in the TriggerStrings.txt
  - Reminders
 * Adding a Condition
  - Adding the Condition in the TriggerData.txt
  - Adding the Condition in the TriggerStrings.txt
  - Reminders

I don't know whether you did or not, but if you didn't, please tell that the position of the object in the txt files represents exactly its position in the list of the object editor.
 

Igor_Z

You can change this now in User CP.
Reaction score
61
CreateTrackable=1,modelfile,real,real,real
_CreateTrackable_Defaults="Abilities\Spells\Other\TalkToMe\TalkToMe.mdl",0,0,RealUnitFacing
_CreateTrackable_Limits=_,_,_,_,_,_,0,360
_CreateTrackable_Category=TC_TRACKABLE

Where should i add this in the triggerstrings. You should explain it a little clearer
 

Sevion

The DIY Ninja
Reaction score
424
Well, in TriggerStrings.txt, you should probably look for Actions, considering that's an action.

Well, the function's name: CreateTrackable.

Code:
CreateTrackable

Then a description:

Code:
CreateTrackable="Create A Trackable"

Then the arguments:

Code:
CreateTrackable="Create A Trackable"
CreateTrackable="Create a Trackable using the model ",~Model File," at ",~Real,", ",~Real," facing ",~Real

And if you need to, a hint:

Code:
CreateTrackable="Create A Trackable"
CreateTrackable="Create a Trackable using the model ",~Model File," at ",~Real,", ",~Real," facing ",~Real
CreateTrackableHint="This creates a trackable. (Duh)

And since it's an action, like I stated above, you put this under Actions.
 
Reaction score
341
He explained a lot of parts a lot simpler than I originally had when I drafted it. So I used parts of his. For example the list.

And in some parts of my first draft were crazy :nuts:

They look the same, apart from yours having better grammar.
 

Sevion

The DIY Ninja
Reaction score
424
Read em, a lot of it I wrote myself. I think ScriptName he explained a lot better. In fact, for a while ScriptName confused me o_o'
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top