Tomb Raider Forums  

Go Back   Tomb Raider Forums > Tomb Raider Level Editor and Modding > Tomb Raider Level Editor > Tomb Raider Next Generation

Reply
 
Thread Tools
Old 10-02-24, 22:54   #1
Horaan
Hobbyist
 
Horaan's Avatar
 
Joined: Mar 2013
Posts: 15
Default Script Globaltrigger light flashes

Hi everyone,

I'm trying to script some screen flashes (TriggerGroup57) when a mesh of an animating is visible (TriggerGroup54).

Here is my script

Code:
; FACE : ANIM238
triggergroup= 53, $5000,238,$0132
triggergroup= 54, $5000,238,$0133
organizer= 11, FO_TICK_TIME+FO_LOOP, ignore, 2,53,13,54,2,53,13,54,2,53,28,54
; actionNG hide mesh ANIM238	TG53	$5000,238,$0132
; actionNG visi mesh ANIM238	TG54	$5000,238,$0133

; FLASH
triggergroup= 57, $2000,355,$0A03
globaltrigger=1, ignore, ignore, ignore, 54,57,ignore
; flipeffect FLASH allumé	TG57	$2000,355,$0A03
but it doesn't run the TG57

I also tried
Code:
globaltrigger=1, ignore, GT_CONDITION_GROUP, ignore, 54,57,ignore
but the TG57 is always ON and it also force to constantly activate TG54
I read the description of GT_COND but I have to admit it wasn't very clear to me

Also tried "... 54,57,53" with both GT but it changes nothing.

For information :
→ Organizer11 is activate in the game thanks to a switch, and it won't be disabled.
→ I can't "Organize" the Flash TG57 because this effect might be effective only in two rooms, and if I leave and come back in those rooms the organizers won't be synchronized anymore
→ My TG54 perfectly works when i don't run the GT1.

Any idea ?
Thanks in advance
Horaan is offline   Reply With Quote
Old 10-02-24, 23:47   #2
LoreRaider
Archaeologist
 
LoreRaider's Avatar
 
Joined: Jul 2016
Posts: 1,887
Default

The problem in your script is that there's no condition trigger in your GlobalTrigger, at the moment GlobalTrigger 1 uses TG54 in condition parameter, but that's one of the TGs you use to turn the object visible (so it's an event trigger)

From what I know there's no such condition to check if a mesh is visible or not, so what you could do is use a separate animating with only that mesh, using OCB 2
That OCB makes the animating go visible/invisible when triggered/antitriggered, so what you will check in your GlobalTrigger is if the object is active or not

This should also be more stable savegames-wise too, I know visibility triggers are problematic sometimes when saving and reloading
LoreRaider is online now   Reply With Quote
Old 11-02-24, 19:29   #3
Horaan
Hobbyist
 
Horaan's Avatar
 
Joined: Mar 2013
Posts: 15
Default

Tanks for your quick answer

I see what you mean, I've made another ANIM for the always-visible part and hide the blinking mesh and vice-versa, but i meet two problems :

1) As i understand, we can't script normal triggers ("Not supported"), so may I have to add this to my script ? : [ActionNG : Trigger (Moveable) Activate <#> Objects wih (E) Timer value (A43)] (and A44for untrigger) ? Or something like this ? I tried to replace my script this way but the ANIM238 doesn't appears
Code:
triggergroup= 53, $5000,238,$002C
triggergroup= 54, $5000,238,$002B
; actionNG untrigg ANIM238  	TG53 	$5000,238,$002C
; actionNG trigger ANIM238  	TG54	$5000,238,$002B
organizer= 11, FO_TICK_TIME+FO_LOOP, ignore, 2,53,13,54,2,53,13,54,2,53,28,54
2) What i forgot to mention is that the ANIM238 (and so the new-one ANIM383) are having an animation, and when i untrigger ANIM238, its animation stops until being reactivated so it's not syncronized anymore with the ANIM383
Horaan is offline   Reply With Quote
Old 11-02-24, 20:06   #4
LoreRaider
Archaeologist
 
LoreRaider's Avatar
 
Joined: Jul 2016
Posts: 1,887
Default

Oh yes that is expected, anti trigger for items also stop animations

What you can do then is set a transparency level with ActionNG A53 (set it to 124), that way it will be "invisible" but still active
Then, with ConditionNG trigger C37, you check if transparency level equals to 124, if so, events will trigger when true
LoreRaider is online now   Reply With Quote
Old 12-02-24, 00:11   #5
Horaan
Hobbyist
 
Horaan's Avatar
 
Joined: Mar 2013
Posts: 15
Default

This way is perfect !

ANIM238 is syncronized with 383 when it's visible and screen flashes too !
Here is my new script :
Code:
; FACE ANIM238
triggergroup= 53, $5000,238,$7C35
triggergroup= 54, $5000,238,$0035
organizer= 11, FO_TICK_TIME+FO_LOOP, ignore, 2,53,13,54,2,53,13,54,2,53,28,54
; actionNG hide ANIM238		TG53	$5000,238,$7C35
; actionNG visi ANIM238		TG54	$5000,238,$0035

; FLASH
triggergroup= 57, $2000,355,$0A03
TriggerGroup= 58, $9000,238,$1F25
triggergroup= 59, $9000,238,$0025
globaltrigger=1, FGT_DISABLED, GT_CONDITION_GROUP, ignore, 59,57,58
; flipeffect FLASH allumé	TG57	$2000,355,$0A03
; COND SI ANIM238 est caché 	TG58	$9000,238,$1F25
; COND SI ANIM238 est visib	TG59	$9000,238,$0025
I've tested the comings and goings in the non-concerned rooms with [trigger : flipeffect : globaltrigger enable and disable (F109)] and added FGT_DISABLE to the GT script + some trigger_triggerers not disturb the begening of the level, and everything is awsome !

I just see a detail that i've didn't notice earlier : with this way of making the transparancy, and as the ANIM238 has a transparent ("additive") texture, every object which is behind are no longer visible when the ANIM238 is visible.. and Lara too

Is there a parameter to add to avoid this effect ? Or do we have to find others triggers ?

Last edited by Horaan; 12-02-24 at 00:19.
Horaan is offline   Reply With Quote
Old 12-02-24, 08:26   #6
LoreRaider
Archaeologist
 
LoreRaider's Avatar
 
Joined: Jul 2016
Posts: 1,887
Default

It's "normal" because it's a different transparency than usual, putting an opaque texture would help I think
LoreRaider is online now   Reply With Quote
Old 15-02-24, 21:58   #7
Horaan
Hobbyist
 
Horaan's Avatar
 
Joined: Mar 2013
Posts: 15
Default

I tried to 'normal' texture the ANIM238 as you suggest but it didn't solve the problem, still invisible objects behind and the textures were darker (maybe because the texture is gradient white to black and because additive makes lighter)

By the way, i had an idea : copy the ANIM238 (now 386) in an invisible 1x1 room not far of the map, retexture the Animating with the additive texture, script the 386 and trigger it with the 238
→ Everything seems to be working perfectly

For the curious, there is my functional script :
Code:
; FACE ANIM238
triggergroup= 53, $5000,238,$0132 ; actionNG hide mesh ANIM238 (A50)
triggergroup= 54, $5000,238,$0133 ; actionNG visi mesh ANIM238 (A51)
organizer= 11, FO_TICK_TIME+FO_LOOP, ignore, 2,53,13,54,2,53,13,54,2,53,28,54

; FLASH
triggergroup= 60, $5000,386,$7C35 ; actionNG transp 124 unused ANIM386 (A53)
triggergroup= 61, $5000,386,$0035 ; actionNG transp  0  unused ANIM386 (A53)
organizer= 12, FO_TICK_TIME+FO_LOOP, ignore, 2,60,13,61,2,60,13,61,2,60,28,61
Triggergroup= 57, $2000,355,$0A03 ; flipeffect FLASH allumé (F355)
TriggerGroup= 58, $9000,386,$1F25 ; COND SI ANIM386 est caché (C37)
Triggergroup= 59, $9000,386,$0025 ; COND SI ANIM386 est visib (C37)
globaltrigger=1, FGT_DISABLED, GT_CONDITION_GROUP, ignore, 59,57,58
For the few tests i've made it's always syncronized, i hope i won't meet save-and-reload problems as you said, that scared me a little ^^'
I'm going to build the rest of my level and see if everything is still okay

Grazie mille for all your help
Horaan is offline   Reply With Quote
Reply

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 12:38.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Tomb Raider Forums is not owned or operated by CDE Entertainment Ltd.
Lara Croft and Tomb Raider are trademarks of CDE Entertainment Ltd.