View Single Post
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