Tomb Raider Forums  

Go Back   Tomb Raider Forums > Tomb Raider Level Editor and Modding > Tomb Raider Level Editor > Tutorials and Resources

Closed Thread
 
Thread Tools
Old 13-08-10, 07:21   #11
TrueRaider
Member
 
TrueRaider's Avatar
 
Joined: Mar 2006
Posts: 384
Default

Thanks for this Raymond! Some of us (me included) don't have enough lateral thinking to be able to make new gameplay elements with the TRNG scripting possibilities, so this will help a lot!
TrueRaider is offline  
Old 13-08-10, 08:13   #12
Raymond
Member
 
Joined: Nov 2007
Posts: 1,689
Default

I´ll add some suggestions for gameplay later on, which use this feature!
@Richard
Please stay on topic and only ask direct question relative to the features! So ask your question about the scream head in an appropriate thread!
Raymond is offline  
Old 20-08-10, 10:03   #13
TR-Freak
Unverified
 
TR-Freak's Avatar
 
Joined: Jan 2008
Posts: 5,140
Default

Why not using this thread to submit User's TRNG-Scripts just like we do it with Objects and Textures?
TR-Freak is offline  
Old 20-08-10, 10:09   #14
Titak
Moderator
 
Titak's Avatar
 
Joined: Jul 2003
Posts: 33,359
Default

A thread like that could be usefull but let's keep this thread for Raymond's stuff only.
Titak is offline  
Old 20-08-10, 14:59   #15
Raymond
Member
 
Joined: Nov 2007
Posts: 1,689
Default

Quote:
Originally Posted by TR-Freak View Post
Why not using this thread to submit User's TRNG-Scripts just like we do it with Objects and Textures?
Good idea, but open a thread, which is exclusively for this purpose then.
This thread here isn´t available for this purpose.
Raymond is offline  
Old 24-08-10, 16:01   #16
Raymond
Member
 
Joined: Nov 2007
Posts: 1,689
Default The horizontally moving platform

The two basic problems

You will encounter two basic problems, if you want to build a horizontally moving platform.

1)
The first problem is, that Lara wouldn´t move with the platform, as she does on a vertically moving platform. So you need to move her with flipeffects in the same direction and the same speed, as the platform moves. Depending on your setup this can become more or less complex.

2)
The second problem is even more basic. All collision in the tr4-engine is blocky. So if you move a platform horizontally and you have dummy-triggers for the platform below the route of it, then you collision would jump from sector to sector and wouldn´t move smoothly with the platform.

The solutions

1)
You can have all kind of setups for the horizontal movement. Let´s do a relatively simple example of continual yo-yo movement to the N and back.

So first we need to move the platform:

Parameters= PARAM_MOVE_ITEM,1,IGNORE,53,DIR_NORTH,13312,32,IGN ORE,IGNORE; platform movement
Parameters= PARAM_MOVE_ITEM,3,IGNORE,53,DIR_SOUTH,13312,32,IGN ORE,IGNORE

This commands defines a movement of the platform with the ID 53 northward for 13 sectors (13312 units) with the speed of 32 units per frame and backward to the south.

For the movement of Lara we use the flipeffect "Lara. (Physics) Pad+Over Mode. Attract Lara in <&>direction with (E)speed". Lara should move in the direction of the platform, as soon as she is on the sector of the plaform. So we use the GT_DISTANCE_FROM_ITEM, where the item is the platform 53 and the distance is 0.
So for the northward movement we have the following lines:
Triggergroup= 15,$2000, 158, $2000; Lara. (Physics) Pad+Over Mode. Attract Lara in <&>direction with (E)speed; <&> : North; (E) : Speed= 32
Globaltrigger= 12,FGT_DISABLED,GT_DISTANCE_FROM_ITEM,53,IGNORE,15 ,IGNORE

And southward:
Triggergroup= 17,$2000, 158, $2004
Globaltrigger= 14,FGT_DISABLED,GT_DISTANCE_FROM_ITEM,53,IGNORE,17 ,IGNORE

So now we have to find a solution, that Lara really moves also north/southward, if the platform does so. So we enable/disable the matching GT`s in the right moments:
Triggergroup= 10,$2000, 167, $1,$2000, 109, $C01,$2000, 109, $E00; move item with param_move_item 1, enable GT 12, disable GT 14
Triggergroup= 12,$2000, 167, $3,$2000, 109, $C00,$2000, 109, $E01; move item with param_move_item 3,disable GT12, enable GT 14

No we need a organizer to do the continual yo-you movement for the platform:
Organizer= 2,FO_LOOP + FO_TICK_TIME,IGNORE,416,10,416,12
The platform has a speed of 32 and moves a distance of 13312 units. So one movement needs 13312:32=416 frames.
You need to trigger the organizer in the map in the wished moment.

2)
As a solution for this problem we use a trick. We place the platform at a door connection between two rooms. As soon as Lara is on the platform, we trigger a flipmap (here flipmap 1) in the upper room, in which we use Toggle Opacicity 1 on the door connection. So as soon, as Lara is on the platorm, the flipemap is triggered and Lara will stand on the TO 1-surface and if she leaves the platform, the flipmap is untriggered. I was surprised, that this idea works indeed, but with some slight limitations. If Lara comes very close to the edges of the platform, it may happen, that Lara falls through the platform and if Lara would jump against the thin edge of the platform, she would move through it. So you have to take this in account.

Triggergroup= 23,$2000, 124, $3E01; FlipMap. Enable <&>flipmap with (E)buttons for activation; <&> : FlipMap= 1; (E) : [1] [2] [3] [4] [5] (Immediate activation)
Globaltrigger= 10,IGNORE,GT_DISTANCE_FROM_ITEM,53,IGNORE,23,IGNOR E
Triggergroup= 24,$2000, 126, $1; FlipMap. FlipOff for <&>flipmap; <&> : FlipMap= 1
Globaltrigger= 11,FGT_NOT_TRUE,GT_DISTANCE_FROM_ITEM,53,IGNORE,24 ,IGNORE

Last edited by Raymond; 24-08-10 at 16:55.
Raymond is offline  
Old 26-08-10, 17:32   #17
Raymond
Member
 
Joined: Nov 2007
Posts: 1,689
Default

I´m just curious: Is there anyone, who understands my two examples (platform, puzzle item) and intends someone to use it?
Raymond is offline  
Old 26-08-10, 17:40   #18
Brikas94
Member
 
Brikas94's Avatar
 
Joined: Mar 2008
Posts: 1,617
Default

Quote:
Originally Posted by Raymond View Post
I´m just curious: Is there anyone, who understands my two examples (platform, puzzle item) and intends someone to use it?
I'm not sure about the puzzle item, but I'm definitely trying out the moving platform thing. Thank you for this thread. It's very useful.
Brikas94 is offline  
Old 26-08-10, 18:00   #19
TrueRaider
Member
 
TrueRaider's Avatar
 
Joined: Mar 2006
Posts: 384
Default

Quote:
Originally Posted by Raymond View Post
I´m just curious: Is there anyone, who understands my two examples (platform, puzzle item) and intends someone to use it?
Absolutely! I was just waiting for the post about the moving platform to be finished so I could let you know whether it worked for me or not.
But yes, your posts are highly appreciated Raymond.
TrueRaider is offline  
Old 26-08-10, 19:40   #20
ukraider
Member
 
Joined: Jun 2001
Posts: 550
Default

Quote:
Originally Posted by Raymond View Post
I´m just curious: Is there anyone, who understands my two examples (platform, puzzle item) and intends someone to use it?
I tried your puzzle example in a test level and got it working without any problems
ukraider 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 13:34.


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.