General Level Editing Thread

builders help builders

Moderator: eTux

Post Reply
User avatar
DJ Full
Master Chatter
Master Chatter
Posts: 6606
Joined: 02 Nov 2010 03:02

Re: General Level Editing Thread

Post by DJ Full » 21 Apr 2017 20:36

OverRaider wrote:
21 Apr 2017 20:02
You can type IGNORE so what`s that -1
"-1" is a code for "IGNORE", I'm typing that because it's shorter.
Every flag has a code, for example instead of EXTRA_TEETH_NO_DAMAGE_ON_WALKING you can type "1".

User avatar
JesseG
Senior Member
Senior Member
Posts: 1053
Joined: 10 Mar 2006 20:33
Location: Connecticut, USA

Re: General Level Editing Thread

Post by JesseG » 22 Apr 2017 01:27

In programming terms, the things like IGNORE and EXTRA_TEETH_NO_DAMAGE_ON_WALKING are called "constants". They are variables with a constant value (ex. IGNORE's value is -1). The numbers are the actual values that are used, but the wordy variable names are there to be helpful if you want to make it more readable. This is why the reference tab has that section called "mnemonic constants", and it's also why you see the "copy name" and "copy value" buttons. When you use "copy value" your clipboard gets the value of the constant (the number), while using "copy name" gives the name of the constant instead.

Just a random FYI, carry on... :)

User avatar
DJ Full
Master Chatter
Master Chatter
Posts: 6606
Joined: 02 Nov 2010 03:02

Re: General Level Editing Thread

Post by DJ Full » 22 Apr 2017 07:10

Still, some of those flags are definitely too uncomfy to remember. It could be:
CUST_SECRET_NUMBER not CUST_SET_SECRET_NUMBER, because "set" is "customize".
Or EXTRA_SOFT_SPIKES not EXTRA_TEETH_NO_DAMAGE_ON_WALKING.
Or CUST_FLYBY_TEXT not CUST_TEXT_ON_FLY_SCREEN.
The truth is I remember stuff like:
- $5000, ID ,$2B is "trigger"
- $9000, ID ,$XX36 is "distance to item"
- $2000, 127, $ID is "launch organizer"
- $8000, X, $10 is "multiple env contidion"
but I cannot remember "familiar flags" no matter how hard I try :)



I cannot do the simpliest setup without running into weird crap.

The camera tutorial says:
- deactivate a Camera with F120 or another static camera
- F406 trigger makes the camera infinite
- another F406 (not scripted everyway) aborts it
- use +TRGOUP_SINGLE_SHOT because multiple is buggy.

This means such a target+camera sequence is possible:

Code: Select all

TriggerGroup=1, $5000, AAA, $2A,> ;target 1
		$5000, AAA, $29	  ;camera 1
TriggerGroup=2, $2000, 406, $0,>  ;stop camera
		$5000, BBB, $2A,> ;target 2
		$5000, BBB, $29	  ;camera 2
TriggerGroup=3, $2000, 406, $0,>  ;stop camera
		$5000, CCC, $2A,> ;target 3
		$5000, CCC, $29	  ;camera 3
TriggerGroup=4, $2000, 406, $0,>  ;stop camera
		$5000, DDD, $2A,> ;target 4
		$5000, DDD, $29	  ;camera 4
TriggerGroup=5, $2000, 406, $0    ;stop camera
It's a talk of two characters, with changing cam+target couples.
The above setup is reduced, in the game I used some couples twice.

Some cameras trigger properly, some too late, other don't at all.
Same for targets: some trigger, some fail to switch to new ones.
It happens both if I use a new cam+target couple or reuse former.

I tried using those triggers in various combinations and orders.
I also tried $2000, 406, 1 - the new "infinite attribute".
In any case I kept all triggergroups in identical structure.

What am I missing now?

User avatar
OverRaider
Member
Member
Posts: 719
Joined: 05 Dec 2012 20:35

Re: General Level Editing Thread

Post by OverRaider » 22 Apr 2017 16:09

I never use the flipeffect for triggering cameras, they are rather annoying because if you don`t set it up as it exactly requires it`s get messed up, I always use the classic trigger for cameras and you can still use the special flipeffect effects for cameras like set camera as cinematic view etc.

In your case I would use organizer and rolling balls and flipeffect to disable keyboard for triggering this whole event

5 rolling balls of which each triggers 1 camera and 1 target for X seconds
All rolling balls to be exported via action trigger for moveable into triggergorup
1 organizer to organize time event when the rolling ball activates the particular camera and target
Flippefect to disable keyboard for X seconds so that players are not able to press look button or cancel the event
It`s neccesary for this set up that you put exactly the same amount of seconds into trigger for cameras (on the map) as you enter the seconds in organizer so that for example:

camera1 4 seconds on the map while triggergroup1 0 seconds in organizer
camera2 5 seconds on the map while triggergroup2 4 seconds in organizer
camera3 7 seconds on the map while triggergroup3 5 seconds in organizer
camera4 2 seconds on the map while triggergroup4 7 seconds in organizer
etc.
and count all seconds to put it into flipeffect to disable keyboard during this event,
(I know it`s not the best solution as puting 5 rolling balls and 10+ triggers on the map takes some precious data but if nothing else works...)
Where is no challenge there is a boredom

Image

User avatar
DJ Full
Master Chatter
Master Chatter
Posts: 6606
Joined: 02 Nov 2010 03:02

Re: General Level Editing Thread

Post by DJ Full » 28 Apr 2017 19:43

I analyzed the issue further and it seems there must be a 2-frame interval between the cameras.
Otherwise the previous camera won't jump to the next one but will stay active, with next timer.
This 2-frame interval allows the chase camera to active for a split second, during the cut.
Both problems can be solved by alternate placed camera / PARAM_SET_CAMERA usage.
Details I described here, and here's the whole page for context.

Does it matter which room I put light effects in, flipped or unflipped? Or is it irrelevant?

User avatar
DJ Full
Master Chatter
Master Chatter
Posts: 6606
Joined: 02 Nov 2010 03:02

Re: General Level Editing Thread

Post by DJ Full » 12 May 2017 11:24

Do we have any list of moveables the AddEffect= command works with?
It appears to be without rules in my case, some objects work other don't.
I see the script limit for these is 99, is it lower if I'm near placed light limit?
(I went for AddEffect since I'm out of bulbs so I thought add_light_flat will do.)

User avatar
psiko
Member
Member
Posts: 611
Joined: 02 Dec 2001 01:56

Re: General Level Editing Thread

Post by psiko » 14 May 2017 00:19

DJ Full wrote:
12 May 2017 11:24
Do we have any list of moveables the AddEffect= command works with?
It appears to be without rules in my case, some objects work other don't.
I see the script limit for these is 99, is it lower if I'm near placed light limit?
(I went for AddEffect since I'm out of bulbs so I thought add_light_flat will do.)
Have you tried the FADD_IGNORE_STATUS for those moveables?..

User avatar
DJ Full
Master Chatter
Master Chatter
Posts: 6606
Joined: 02 Nov 2010 03:02

Re: General Level Editing Thread

Post by DJ Full » 14 May 2017 00:47

What a priceless flag, I had no idea it exists. Thank you :)
But apparently my issue wasn't only this. I had ENV_ROOM_IS.
Which was activating the light when Lara was leaving the room :anxious:

User avatar
DJ Full
Master Chatter
Master Chatter
Posts: 6606
Joined: 02 Nov 2010 03:02

Re: General Level Editing Thread

Post by DJ Full » 14 May 2017 09:32

Analyzed further. It seems for pickups, IGNORE_STATUS is just ignored.
So, if you add an effect e.g. to FLARE_INV_ITEM, you do this:

GlobalTrigger=95, FGT_SINGLE_SHOT, GT_ALWAYS, -1, -1, 187, -1
Triggergroup=187, $5000, 437, $2B, $5000, 437, $930 ; trigger flare_inv -> light flare_inv
AddEffect=9,ADD_LIGHT_FLAT,FADD_CONTINUE_EMIT,JOINT_SINGLE_MESH,0,0,0,-1,-1,8,16,MIST_COL_WHITE



and when you do it for ANIMATING16_MIP you can skip the object activation:

GlobalTrigger=95, FGT_SINGLE_SHOT, GT_ALWAYS, -1, -1, 187, -1
Triggergroup=187, $5000, 437, $930 ; light flare_inv
AddEffect=9,ADD_LIGHT_FLAT,FADD_IGNORE_STATUS+FADD_CONTINUE_EMIT,JOINT_SINGLE_MESH,0,0,0,-1,-1,8,16,MIST_COL_WHITE



I'm using objects to emit lights because I'm very close to max 768 lightbulbs.
However I don't know how AddEffect= will coexist with so many normal lights.
About to find out if it allows to bypass their limit or if the map gets broken :)

EDIT: Got 768 lightbulbs plus 4 permanent ADD_LIGHT effects. Nothing broke so far :)

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests