How to: Modify the World Editor's Trigger Editor

Narks

Vastly intelligent whale-like being from the stars
Reaction score
90
in ausfailia, copyright is free and automatic

probably same in other countries too
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Awesome tutorial :thup:

Just need some help here.. I don't really understand what a trackable is...

And, how do we create TriggerString for this?

Code:
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

And also, this part in your tutorial is wrong.
Now, let's take another break. This is a lot to soak in

Now, we've learned Actions, Conditions, Variables, and Events. Wait! We need to get things like Triggering Trackable! Because there is no function for GetTriggeringTrackable in GUI! So, we need to figure out how we're going to set our new variable to the Trackable that's clicked. We can't do it without a bit of JASS unless we create a new function! Let's get started.

For anyone who doesn't know, there's a function called Triggering Unit, correct? So, we find _GetTriggeringUnit

We get:

Code:
GetTriggerUnit=0,0,unit
_GetTriggerUnit_Defaults=
_GetTriggerUnit_Category=TC_EVENTRESPONSE

If you search _GetTriggeringUnit you won't find anything. Need to search GetTriggerUnit instead.
 

Sevion

The DIY Ninja
Reaction score
413
Well, if you take a look at our first example of TriggerString:

Code:
RemoveLocation="Remove Location"
RemoveLocation="Remove ",~Location
RemoveLocationHint=

First off we need to change the name. Our function name is CreateTrackable. So:

Code:
CreateTrackable="Remove Location"
CreateTrackable="Remove ",~Location
CreateTrackableHint=

Next, we have the string to display after the category. We want it to display "Trackable - Create Trackable".

Recall that the string in the first line defines this. So we change it from Remove Location to Create Trackable.

Code:
CreateTrackable="Create Trackable"
CreateTrackable="Remove ",~Location
CreateTrackableHint=

Next, is the text inside of the box under the drop-down selection box. Recall that the second line defines this and that "," signifies concatenate and "~" signifies variable. We simply change it to "Create ",~Trackable

Code:
CreateTrackable="Remove Location"
CreateTrackable="Create ",~Trackable
CreateTrackableHint=

Lastly, we have the optional Hint to display in gray at the bottom of the dialog. Recall that the final line defines this. You can put whatever you wish in here.
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Hmmm okay. But still.. what is a trackable.. and what does it do?

Edit: Okay I put this into the [TriggerCallStrings] and they still gave me the error.

Code:
CreateTrackable="Remove Location"
CreateTrackable="Create ",~Trackable
CreateTrackableHint=

If this was meant for action string, then here in your guide it said that I should put this, in the [TriggerCalls]

Code:
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

Little confused here o.o
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Code:
Trigger Database Error

[TriggerCalls] - CreateTrackable

Data section and text section have differing number of paramenters (2,1)
 

Sevion

The DIY Ninja
Reaction score
413
Oh, I'm sorry. CreateTrackable takes String (modelfile), X, Y, and Facing (all reals).

Code:
CreateTrackable="Create Location"
CreateTrackable="Create a trackable with the model ",~modelfile," at (",~real,", ",~real,") facing ",~real," degrees"
CreateTrackableHint=

Sorry, it's been a while since I've done this :p

Remember, TriggerActions/Calls and their string counterparts need to have the same arguments.
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Okay thanks :)

Edit:

So I entered this
Code:
// returns trackable
CreateTrackable="Create Trackable"
CreateTrackable="Create a Trackable with the model ",~modelfile," at (",~real,", ",~real,") facing ",~real," degrees"
CreateTrackableHint="Creates a trackable."

And I get this error

Code:
Trigger Database Error

[TriggerCalls] - CreateTrackable

Data section and text section have differing number of paramenters (2,4)
 

Sevion

The DIY Ninja
Reaction score
413
If I remember correctly, the TriggerCall should have the return type after the Version and Usable-In-Events part.

Code:
CreateTrackable=1,0,trackable,modelfile,real,real,real
_CreateTrackable_Defaults="Abilities\Spells\Other\TalkToMe\TalkToMe.mdl",0,0,RealUnitFacing
_CreateTrackable_Limits=_,_,_,_,_,_,0,360
_CreateTrackable_Category=TC_TRACKABLE

Reference:

Now, we've learned Actions, Conditions, Variables, and Events. Wait! We need to get things like Triggering Trackable! Because there is no function for GetTriggeringTrackable in GUI! So, we need to figure out how we're going to set our new variable to the Trackable that's clicked. We can't do it without a bit of JASS unless we create a new function! Let's get started.

For anyone who doesn't know, there's a function called Triggering Unit, correct? So, we find _GetTriggeringUnit

We get:

Code:
GetTriggerUnit=0,0,unit
_GetTriggerUnit_Defaults=
_GetTriggerUnit_Category=TC_EVENTRESPONSE
So, GetTriggerUnit=0,0,unit

It's syntax is: Function=0/1 Compatibility,0/1 Event Usable,Return Type

So, GetTriggerUnit is the JASS function, 0 means it works for ROC, 0 means it can't be used in Events, and unit is the type it returns.

So ours goes:

Code:
GetTriggerTrackable=1,0,trackable
_GetTriggerTrackable_Defaults=
_GetTriggerTrackable_Category=TC_EVENTRESPONSE
And we've already leanred about Defaults and Categories. So, we have when the trackable is clicked or moused over and the function to get that trackable. WAIT! We need trackables in order for this to fire! So what do we do? We add an action to create trackables!
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
So this is supposed to be in trigger actions?
Code:
CreateTrackable=1,0,trackable,modelfile,real,real,real_CreateTrackable_Defaults="Abilities\Spells\Other\TalkToMe\TalkToMe.mdl",0,0,RealUnitFacing
_CreateTrackable_Limits=_,_,_,_,_,_,0,360
_CreateTrackable_Category=TC_TRACKABLE

And this in the trigger action strings?

Code:
CreateTrackable="Create Trackable"
CreateTrackable="Create a trackable with the model ",~modelfile," at (",~real,", ",~real,") facing ",~real," degrees"
CreateTrackableHint=

And then this

Code:
GetTriggerTrackable=1,0,trackable
_GetTriggerTrackable_Defaults=
_GetTriggerTrackable_Category=TC_EVENTRESPONSE

is supposed to be in trigger calls?

So what about the Trigger Call Strings? Because I saw the examples there, and I still have no idea what a trackable does. o.o
 

Sevion

The DIY Ninja
Reaction score
413
No no. The first two go into the Calls section.

You also need a string set for the GetTriggerTrackable.

A trackable detects mouse clicks.
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Okay I'm very lost. I have no idea what strings I should display for the trackables because I don't know how they work. Trackabled hit/tracked. I also have no idea what I'm missing, or am doing wrong. Am I supposed to have 2 categories?

Code:
GetTriggerTrackable=1,0,trackable
_GetTriggerTrackable_Defaults=
_GetTriggerTrackable_Category=TC_EVENTRESPONSE

Does this go into TriggerEvents?

Can you show me how the string should be like? I tried making my own:

Code:
GetTriggerTrackableEvent="Trackable gotten"
GetTriggerTrackableEvent=~Trackable," gotten"
GetTriggerTrackableEventHint="Use 'Event Response - Trackable gotten' to refer to the trackable that is gotten."

Doesn't really make sense to me.
 

Sevion

The DIY Ninja
Reaction score
413
Both are Calls. Calls return something.

Reference:

Now we remember that we need to move it to [TriggerCalls] because we can't set a variable to an action. We need to set it to a function call. So move it to [TriggerCalls] Now, if you look the syntax is slightly different. So we modify it a bit to match syntax and we get:
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top