www.tombraiderforums.com  

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

Reply
 
Thread Tools
Old 10-05-12, 20:43   #4131
skylark1121
Relic Hunter
 
skylark1121's Avatar
 
Join Date: Sep 2010
Posts: 5,005
Default

Quote:
Originally Posted by Raymond View Post
The flipeffect is working in 1.2.2.6. So there is something else wrong. Which trng-version do you use?

TRNG - 1.2.2.6

NG_Center and Scripter - 1.03.039 (if that matters).



Edit: Uh oh...

You see, I just installed TRNG/NGLE on a different computer. I thought everything was going well, but it would appear no flipeffects are working. I haven't tested all of them, of course, but the Lara (Health), Room, and OldFlip flipeffects aren't working.

Last edited by skylark1121; 10-05-12 at 21:00.
skylark1121 is offline   Reply With Quote
Old 10-05-12, 22:10   #4132
DJ Full
Professor
 
DJ Full's Avatar
 
Join Date: Jul 2007
Location: Poland (CET)
Posts: 4,113
Default

And I have some triggers in my project. All of them in form of LEVER_SWITCH. You can throw this object backwards and forwards. I am looking for a script way to do a one-shot (and blocking the possibility to throw the switch backwards), because I already hit the object limit in these rooms and I can't place pink triggers. I assume this has to do something with disabling certain StateIDs?
__________________
Press F to type F.
DJ Full is offline   Reply With Quote
Old 10-05-12, 22:50   #4133
RardRaider
Student
 
RardRaider's Avatar
 
Join Date: Mar 2011
Location: Germany
Posts: 131
Default

Quote:
Originally Posted by DJ Full View Post
And I have some triggers in my project. All of them in form of LEVER_SWITCH. You can throw this object backwards and forwards. I am looking for a script way to do a one-shot (and blocking the possibility to throw the switch backwards), because I already hit the object limit in these rooms and I can't place pink triggers. I assume this has to do something with disabling certain StateIDs?
The easiest way is to move the LEVER_SWITCH close to a wall so that Lara can't flip it back

If that isn't possible you can trigger any switch via GT, no floor trigger necessary:
  • Put everything you want to trigger with your switch in a TG (that will be triggered by the GT)
  • Delete floor triggers incl. switch trigger on the switch's square, not needed anymore
  • Create another TG with just one condition testing the switch's state-id (Usually 1=switch is on, but some switches have inverse state-ids, I'd check wadmerger first using c22. Use this condition as GT_CONDITION_GROUP. Something like this:

    Code:
    ;Set Trigger Type - CONDITION 22
    ; Exporting: CONDITION(22:60) for OBJECT(21)
    ; <#> : LEVER_SWITCH               ID 21     in sector (8,8) of ScorpRoom
    ; <&> : Creature. Current State Id of <#>creature is (E)State Id
    ; (E) : StateId=    1
    ; Values to add in script command: $9000, 21, $116
  • Make the GT FGT_SINGLE_SHOT
__________________
Think outside the box in a way that you need Lara's binoculars to see the box.

Last edited by RardRaider; 10-05-12 at 22:51.
RardRaider is offline   Reply With Quote
Old 11-05-12, 02:13   #4134
skylark1121
Relic Hunter
 
skylark1121's Avatar
 
Join Date: Sep 2010
Posts: 5,005
Default

Previous Post.

Grrrr. The problem is a bit different now. Whenever Lara goes over a trigger square that has a Flipeffect, the game freezes...
skylark1121 is offline   Reply With Quote
Old 11-05-12, 11:16   #4135
DJ Full
Professor
 
DJ Full's Avatar
 
Join Date: Jul 2007
Location: Poland (CET)
Posts: 4,113
Default

@RardRaider,

the problem is a bit deeper. There are SEVERAL switches in a SINGLE slot, and they all open the same door. I already did everything You advised, in the previous version of my level, plus: I repeated that particular StateID condition for every single switch, to form a condition group.

The problem was: when I made a second triggergroup, and third (for other series of triggers, put in other places), the door kept opening BEFORE all switches were pressed. Another time when I think there's a TRNG bug, making values of different triggers of the same kind interfere or add to each other.



This is why, in present version of my level, I decided to try variables. Now pressing a switch should cause 1-unit incremental increase of variable value - I mean:

switch1 on -> variable = 1
switch2 on -> variable = 1+1=2
switch3 on -> variable = 2+1=3
switch4 on -> variable = 3+1=4

and so on.

When the value equals critical, the door opens. This way I don't need so many arguments and trigger interference would be less likely to happen.


So we have two setups: old (TG one) and new (variable). I'll test your FGT_SINGLE_SHOT and examine it in both cases... However, in the second case it might not override adding a value when a player throws the switch back and forth... I'll check if it does, but I'm rather looking for some batch solution, to treat all those triggers as a single event (and remove disturbing lines from the script). All those switches are all in the same slot, so maybe setting slot as selected item would help. I never touched this side of scripting, so I might write nonsense though.
__________________
Press F to type F.
DJ Full is offline   Reply With Quote
Old 11-05-12, 14:55   #4136
Raymond
Archaeologist
 
Join Date: Nov 2007
Posts: 1,689
Default

The above setup should work, if you set the Switch-Trigger on One Shot. And there is certainly no trng-bug in the other setup, but surely a "bug" in your thinking.

@skylark
Your installation is very obviously totally messed. The NG_Center version should be 1.04.012.
Raymond is offline   Reply With Quote
Old 11-05-12, 15:43   #4137
skylark1121
Relic Hunter
 
skylark1121's Avatar
 
Join Date: Sep 2010
Posts: 5,005
Default

Quote:
Originally Posted by Raymond View Post
The above setup should work, if you set the Switch-Trigger on One Shot. And there is certainly no trng-bug in the other setup, but surely a "bug" in your thinking.

@skylark
Your installation is very obviously totally messed. The NG_Center version should be 1.04.012.
NG Center even says that 1.3.39 is the latest update...
Reinstall?
skylark1121 is offline   Reply With Quote
Old 11-05-12, 16:39   #4138
DJ Full
Professor
 
DJ Full's Avatar
 
Join Date: Jul 2007
Location: Poland (CET)
Posts: 4,113
Default

Quote:
Originally Posted by Raymond View Post
The above setup should work, if you set the Switch-Trigger on One Shot. And there is certainly no trng-bug in the other setup, but surely a "bug" in your thinking.
The above setup works. The problem is it works up to third TG, and it refuses to work with 4th one, even though it's scripted the identical way. I often hit limits which no-one else cares about hitting, so I don't deny this or that.

OK, then. Here are my two methods, old and new, built and tested in a short level, only containing a single TG location (the real level includes several of them). Both of the following worked properly to open the door:


THE TG METHOD I PREVIOUSLY USED
Code:
TriggerGroup=1, $9000, 2, $116,>	;this column contains conditions which
		$9000, 3, $116,>	;check for each switch separately
		$9000, 4, $116,>	;if it is pressed (stateID1) or not
		$9000, 5, $116,>	;so it takes a lot of arguments
		$9000, 6, $116,>	;and when my level contains four such TGs
		$9000, 7, $116		;this causes malfunction of whole setup
TriggerGroup=2, $5000, 0, $11A,>		;these two lines open the exit doors
		$5000, 1, $11A			;using the ACTION trigger for opening such
GlobalTrigger=1, FGT_SINGLE_SHOT, GT_CONDITION_GROUP, IGNORE, 1, 2, IGNORE	;this executes the whole setup

THE VARIABLE METHOD, FROM TITAK'S ADVICE POST (#3569)
Code:
;SETUP PART WHICH ACCUMULATES A CONDITION VALUE
TriggerGroup=4, $8000, 324, $1E,>	; Lara. (Animation) Lara is performing <324>animation (pressing switch)
		$8000, 1, $10		; and Multiple condition of <1>MultEnvCondition script command in (E)way (below)
MultEnvCondition=1, ENV_ANIM_COMPLETE, IGNORE, IGNORE	;if Lara finished that animation
TriggerGroup= 5, $2000, 231, $150	;Variables. Numeric. Add to <LocalShortAlfa1>Variable the (1)value
GlobalTrigger=2, IGNORE, GT_CONDITION_GROUP, IGNORE, 4, 5, IGNORE	;lara presses switch -> add +1 to value

;SETUP PART WHICH OPENS THE DOOR AT THE TOTALLY ACCUMULATED CONDITION VALUE
TriggerGroup=6, $8000, 80, $62B		;Variables. The <LocalShortAlfa1>Numeric Variable is = than (8)Value
TriggerGroup=7, $5000, 0, $11A,>
		$5000, 1, $11A		;Trigger. (Door) (E)Open/Close <#>door
GlobalTrigger=3, FGT_SINGLE_SHOT, GT_CONDITION_GROUP, IGNORE, 6, 7, IGNORE	;all 8 switches pressed -> open exit
As You can see in the second method, I decided to use Lara's animation as one of conditions, because I found no condition (or combination of those) allowing me to add +1 to variable value when selected slot is activated.

SUMMARY:
1st method contains several TGs with many arguments, possibly interfering and damaging the setup even though it is set up with the identical GT.
2nd method won't cause any interference, because it's shortly written - anyway it allows players to open the door using one switch 8 times.

So 2nd method is still problematic - if I stick to it, I'll have to somehow disable reverse throw-ability of LEVER_SWITCH. As long as deleting animations in WadMerger is impossible, maybe changing Next StateID will help. I don't know, never touched those. I'll keep trying and reporting. Let me know if You know something that might help me.
__________________
Press F to type F.

Last edited by DJ Full; 11-05-12 at 16:40.
DJ Full is offline   Reply With Quote
Old 11-05-12, 17:05   #4139
Titak
Moderator
 
Titak's Avatar
 
Join Date: Jul 2003
Location: Drenthe, The Netherlands
Posts: 32,542
Default

Why condition TG4 with those particular conditions?

Can't you simply place a trigger for adding the value to the variable underneath each switch and making the switch-triggers one-shot so the switch can only be used once?
Or does that not work with the lever-switch?
__________________
If it walks like a duck and if it quacks like a duck, it is a duck.
Titak is offline   Reply With Quote
Old 11-05-12, 19:23   #4140
Raymond
Archaeologist
 
Join Date: Nov 2007
Posts: 1,689
Default

This should also work with the lever switch.

Quote:
Originally Posted by skylark1121 View Post
NG Center even says that 1.3.39 is the latest update...
Reinstall?
Oh, sorry, my fault. Im on a newer Betaversion. But there must be something messed still in your installation. Otherwise the flipeffects would work correctly. A correct reinstallation should help.

Last edited by Raymond; 11-05-12 at 19:30.
Raymond 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 02:45.


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