Go Back   www.tombraiderforums.com > Tomb Raider Modding > Tomb Raider Level Editor > Tomb Raider Level Editor Tutorials

Closed Thread
Thread Tools
Old 25-08-15, 06:49   #1
Join Date: Dec 2011
Location: Hungary
Posts: 2,376
Default TRNG - Script Triggers and TriggerGroup Commands

by Cook

A script trigger is a trigger that is created in NGLE but stored in the script and not placed in a level.

Open the Set Trigger Type window in NGLE and set up the trigger you want to create.

Press the "Export Script Trigger" button and a Notepad window opens with the script trigger text.

Note: The script trigger information text file is saved to the same folder as NGLE and the "Export Script Trigger" button will only appear for the new NG triggers.

Select the three values at the end of the last line after the colon ":", right click and copy them. This set of three values is the script trigger.

Switch to your script in NGCenter.

Script triggers must be placed in the script after TriggerGroup= commands.
Add a "TriggerGroup=" command to the [Level] section of your script and follow it with a number and then a comma ",". Each TriggerGroup you create in the same [Level] must have a unique number.

Place the cursor after the comma, right click and paste the three values.

Build your script and hopefully you have no errors.

This is all you need to do to create a valid trigger, however, you will not know what the trigger does. That is why NGLE exports the other information when you export a script trigger. Since all the lines in the text start with a semicolon ";" it is safe to select all and copy and paste the text into the script.

Note: This is for your own information only and is not needed to make a trigger work.

A condensed way to comment your trigger is like this.

Build the script again to check for errors.

Now I want to move another object at the same time this trigger is activated. To add another script trigger to the TriggerGroup, as before, set up the trigger in NGLE for the object.

Export the script trigger and copy the three values.

In NGCenter place a comma "," after the last value in the TriggerGroup and paste the three values.

Build your script and check for errors.

Script commands must be on one line. If you want a command split over multiple lines you can use the ">" character. I want to break this line so I can comment each trigger.

Build the script again and check for errors.

The script triggers in the TriggerGroup are just like the triggers in the level, they will not do anything until their TriggerGroup is activated. One way to activate a TriggerGroup is by a FLIPEFFECT trigger placed in the level.

When Lara enters this sector the script triggers in TriggerGroup 1 will activate.

If you trigger the TriggerGroup this way, you can replace the script triggers in the TriggerGroup and test them by just rebuilding the script as long as you have already converted the level. No need to place new triggers in NGLE and convert the level again.

Script syntax

Text can be uppercase or lowercase in commands and values. TriggerGroup or TRIGGERGROUP or triggergroup are valid.

Spaces between values are ignored so TriggerGroup=1,$5000,1,$323 is okay.

Do not put any spaces in a command or value. Trigger Group = will cause an error.

A semicolon ";" tells NGCenter to ignore the text after it, so any text can be placed between the semicolon and the end of the line.

The values after the "=" in a command must be separated by commas ",". See NGCenter's reference tab for the correct syntax.

If you are not using a value you need to put something in that position of the command so NGCenter receives the correct number of values for it's functions. Usually the value you must use is "IGNORE".

The status bar of NGCenter helps with the syntax except when the line is broken with the line continuation character ">".

Note: If you want greater control moving an object, use the FLIPEFFECT trigger in combination with a Parameters= command in the script instead of the ACTION trigger used here.

Last edited by AkyV; 25-08-15 at 08:52.
AkyV is offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT. The time now is 03:13.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2017, vBulletin Solutions Inc.