13-08-10, 07:21 | #11 |
Member
Joined: Mar 2006
Posts: 384
|
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!
|
13-08-10, 08:13 | #12 |
Member
Joined: Nov 2007
Posts: 1,689
|
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! |
20-08-10, 10:03 | #13 |
Unverified
Joined: Jan 2008
Posts: 5,140
|
Why not using this thread to submit User's TRNG-Scripts just like we do it with Objects and Textures?
|
20-08-10, 10:09 | #14 |
Moderator
Joined: Jul 2003
Posts: 33,359
|
A thread like that could be usefull but let's keep this thread for Raymond's stuff only.
|
20-08-10, 14:59 | #15 |
Member
Joined: Nov 2007
Posts: 1,689
|
|
24-08-10, 16:01 | #16 |
Member
Joined: Nov 2007
Posts: 1,689
|
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. |
26-08-10, 17:32 | #17 |
Member
Joined: Nov 2007
Posts: 1,689
|
I´m just curious: Is there anyone, who understands my two examples (platform, puzzle item) and intends someone to use it?
|
26-08-10, 17:40 | #18 |
Member
Joined: Mar 2008
Posts: 1,617
|
|
26-08-10, 18:00 | #19 | |
Member
Joined: Mar 2006
Posts: 384
|
Quote:
But yes, your posts are highly appreciated Raymond. |
|
26-08-10, 19:40 | #20 |
Member
Joined: Jun 2001
Posts: 550
|
|
Thread Tools | |
|
|