PDA

View Full Version : Triggering under certain conditions


Titak
09-04-09, 15:08
Hi :wve:

Well, I can't for the life of me find any information again about triggering something when certain conditions are met. :hea:

Like, I want something to trigger ONLY if Lara has a Large WaterSkin containing 3 litres in her inventory.
This should be possible, but I can't remember how to do this and where to get the information on how to set this up. :o

Anyone? :D

Raymond
09-04-09, 15:33
First you have to learn how to use Global Triggers (GT). Cook did a tut in the Skribblerz Forums recently about this.
You don´t find a usable GT directly. So use the GT_CONDITION_GROUP. With this you can use a condition trigger in a trigger troup and export it into the global trigger as a condition.
You export this condition trigger: Inventory. Present <#>inventory_item. Your item is the Large WaterSkin containing 3 litres.
More tomorrow, if needed. Study Global Triggers in the meantime!

Titak
09-04-09, 16:19
Thanks Raymond! :hug:

This'll get me started!
I'll post back here if I need more help with it. :D

Hateshinai
09-04-09, 17:44
I wish I had Raymond's knowledge about the TRNG ... :rolleyes:

Titak
09-04-09, 17:45
Okay, I've been reading the tutorials and added the GlobalTrigger= and 2 different TriggerGroup= commands to my script.
One of the TriggerGroups is the one for the condition "having waterskin2-5 in inventory", the other one is supposed to trigger an audio flipeffect.

Here's what I want to do:
Level 1:
Lara finds a waterskin2 adn she has to fill it with water.

Level2:
An audioflipeffect trigger should only activate when Lara returns from level1 with the filled waterskin (waterskin2-5) AND when she steps onto the trigger.
At the same time two doors should open (or a flyby should start, whichever works best)

But the triggers for the doors or a flyby camera can't be exported.
So how do I activate them with the same conditions? :confused:


Right, first things first.
I'm first going to test whether or not my current setup activates the audio at the right place with waterskin2-5 in Lara's inventory.

To be continued...

Titak
09-04-09, 17:47
I wish I had Raymond's knowledge about the TRNG ... :rolleyes:
So do I... I still have so much to learn.
But I'm not really to experimenting type. I only start to experiment with things when I need them for my level. :rolleyes:

sapper
09-04-09, 19:12
I think there are some ACTION triggers you can use for triggering doors and flybys.
ACTION triggers can be exported.

If you want to trigger everything at a particular sector just place the condition trigger on the sector with the other triggers, don't bother with a globaltrigger.

Raymond
09-04-09, 22:24
Sapper is right. If you really need the condition only on a certain trigger tile, then just place the condition trigger there and if you need to export triggers for doors, flyby´s etc. you have them also available as action triggers.

Titak
10-04-09, 10:20
I couldn't make it work but with this new info I'll give it another try.
If I don't use it in the end (I've already been thinking of another setup), well, at least I'll have gained some more understanding about condition triggers and action triggers. :D

But before I start experimenting again, any idea if I'll still need the TriggerGroup in the script? :confused:

Raymond
10-04-09, 10:51
You can do it with a triggergroup, but it isn´t necssary here. Just place the conditional trigger Inventory. Present <#>inventory_item for your filled waterskin on the same trigger tile, where the triggers are, which you want to use and it`ll work too.
You must get to know Global Triggers anyway, if you want to use the trng for real. So your study will be useful certainly!

Titak
10-04-09, 11:33
Just place the conditional trigger Inventory. Present <#>inventory_item for your filled waterskin on the same trigger tile, where the triggers are, which you want to use and it`ll work too.

I don't get it... I did that and it doesn't work... :confused:

Hang on, I'll get some more detailed info for you to look at.
Maybe I forgot something/overlooked something. ;)


*** EDIT ***
Can't upload images right now so here's the trigger info typed out:

PARAMETER - CONDITION trigger:
Trigger (what to trigger): PARAMETER
Object to trigger: WATERSKIN2_5 Slot=305
Type: CONDITION
Timer (Parameter): Inventory. Present <#>inventory_item

I made this trigger "One shot".

REGULAR triggers:
TRIGGER (0,0) for DOOR_TYPE2 (1212)
TRIGGER (0,0) for CAMERA (2260)

I click on the the trigger tiles in the 2D grid, I first see the Condition trigger.
The other regular triggers are underneath it.
Does the order in which the triggers have been place matter? (I'm asking because it sometimes does matter in the script.)

Titak
10-04-09, 12:54
Well, it might be that the CONDITION trigger does not work with the WATERSKIN2_5. :confused:

I tried with UZI and then it worked. The other triggers were only activated when Lara stepped on the CONDITION trigger when she had the UZI in her inventory, just like it was supposed to.
It also works with the WATERSKIN2_EMPTY.
But not with the WATERSKIN2_5... :confused:

And this is what I need... I need it to work with the WATERSKIN2_5... :(

Could someone also test this?
To see if it is indeed a general bug and not something weird in my project. ;)

*** UPDATES ***
Works with:
but... see remarks below
WATERSKIN1_EMPTY
WATERSKIN1_1
WATERSKIN1_2
WATERSKIN2_EMPTY
WATERSKIN2_1


Doesn't work with:
WATERSKIN1_3
WATERSKIN2_2
WATERSKIN2_3
WATERSKIN2_4
WATERSKIN2_5

Remarks concerning WATERSKIN1_EMPTY or WATERSKIN2_EMPTY in the CONDITION trigger:
Works only with the corresponding EMPTY waterskin in the inventory.
So this is working exactly the way it is supposd to work.

Remarks concerning WATERSKIN1_1 in the CONDITION trigger:
WATERSKIN1_1 works only with WATERSKIN1 filled with 1 litre in the inventory.
(Well, this makes sense, doesn't it? So this one is working the way it is supposed to work.)

Remarks concerning WATERSKIN1_2 in the CONDITION trigger:
WATERSKIN1_2 in the CONDITION trigger activated the trigger with a full WATERSKIN1 (small waterskin containing 3 litres).

Remarks concerning WATERSKIN2_1 in the CONDITION trigger:
Works with WATERSKIN2 filled with 1 litre, filled with 2 litres and filled with 5 litres (full)
It does not work with a WATERSKIN2 filled with 3 litres or filled with 4 litres in the inventory.

(I also reported this at skribblerz so Paolone can see it as well. ;))

Titak
10-04-09, 16:16
Just to let you know: Bedazzled (over at skribblerz) tested this as well and had the same results.
So it is not just my project acting weird. ;)