Customize Secret Number

builders help builders

Moderator: eTux

Post Reply
User avatar
justin
Chatterbox
Chatterbox
Posts: 2019
Joined: 08 Dec 2001 01:38
Location: CT, USA

Customize Secret Number

Post by justin » 21 Aug 2020 20:07

Okay, so I guess I never solved this problem I found years ago. I'm using Customize=CUST_SET_SECRET_NUMBER in each of my levels (as opposed to the title screen). While the correct max number shows in each level, the counter still counts ALL secrets. So for example, by level 3 I have like 9/2 secrets :lol:

Anyone know why this feature doesn't work, or if there is something I'm missing? TRNG 1.3.0.0 and NG_Center 1.5.0

Thanks!
Dark Skies loom...
https://youtu.be/TScjB7EjBlI

User avatar
Alex Chap
Member
Member
Posts: 600
Joined: 22 Apr 2014 09:55
Location: France, Oise

Re: Customize Secret Number

Post by Alex Chap » 21 Aug 2020 20:27

Hi Justin,

This flipeffect may help you : $2000, 246, $4D

It resets the secret counter, I suggest you to use it on the Finish trigger you have.
It's quite hard to find as it's in the Variables, from here you can play with many parameters and values.
Image

User avatar
justin
Chatterbox
Chatterbox
Posts: 2019
Joined: 08 Dec 2001 01:38
Location: CT, USA

Re: Customize Secret Number

Post by justin » 22 Aug 2020 00:44

Crap, I was afraid of that :lol:

As you can guess by my reaction, my game is a huge hub-based game, so i'd have to save the variable data and then reload it correctly for each level :hammer:

Thanks for the idea, i'll start testing it :)
Dark Skies loom...
https://youtu.be/TScjB7EjBlI

User avatar
Alex Chap
Member
Member
Posts: 600
Joined: 22 Apr 2014 09:55
Location: France, Oise

Re: Customize Secret Number

Post by Alex Chap » 22 Aug 2020 01:50

Oh yes, you'll need some extra work. I think you'll have to use global variables to store the amount of secrets the player collected for each level, and set this amount at the beggining of them.

If you need the flipeffects, I may be able to help you if you want.
Image

User avatar
justin
Chatterbox
Chatterbox
Posts: 2019
Joined: 08 Dec 2001 01:38
Location: CT, USA

Re: Customize Secret Number

Post by justin » 23 Aug 2020 15:18

I just hope I have enough global variables open 😂
I'm already using a few to handle some special camera triggers :)
Dark Skies loom...
https://youtu.be/TScjB7EjBlI

User avatar
justin
Chatterbox
Chatterbox
Posts: 2019
Joined: 08 Dec 2001 01:38
Location: CT, USA

Re: Customize Secret Number

Post by justin » 23 Aug 2020 22:24

Thanks so much for the help, Alex Chap!

Using the flipeffect above accomplishes what I want each time Lara jumps into a level. To correct the secret counter, now, I use a single trigger to check to see if a secret door is open. If it is, I use $2000, 249, $14D to ADD a number to the Secret counter, so this correctly resets the counter every time you jump between the levels (I didn't even need to use any more global bytes!)

Now, the next hurdle will be to store the overall secret value in a free global byte slot, in order to trigger a secret level if the player has actually collected all 50 or so secrets :)
Dark Skies loom...
https://youtu.be/TScjB7EjBlI

User avatar
Alex Chap
Member
Member
Posts: 600
Joined: 22 Apr 2014 09:55
Location: France, Oise

Re: Customize Secret Number

Post by Alex Chap » 23 Aug 2020 23:39

I can't find a way to copy specifically the secret counter's value, but you can use another variable that increases each time the player find a secret.

Also be careful with the variable slots you use, for your cameras checks I think it's better to use local ones.
I also discovered this recently but it seems that TRNG, for exemple, see Delta 1 Local the same way as Delta 1 Global. It's quite hard and confusing to explain but if you copy one of these variables values in the Current Value, all values will be transfered, I might be wrong but there can be a little confusion with it.
Image

User avatar
justin
Chatterbox
Chatterbox
Posts: 2019
Joined: 08 Dec 2001 01:38
Location: CT, USA

Re: Customize Secret Number

Post by justin » 24 Aug 2020 01:29

Yeah I was going to do exactly that, using a separate counter for the overall secrets :)

As for my camera, it needs to be global, because it should only trigger if something happened in another level. We'll find out if this has any conflicts after i play through the entire game :)
Dark Skies loom...
https://youtu.be/TScjB7EjBlI

User avatar
justin
Chatterbox
Chatterbox
Posts: 2019
Joined: 08 Dec 2001 01:38
Location: CT, USA

Re: Customize Secret Number

Post by justin » 01 Sep 2020 01:26

So far so good!

Trigger each secret with a door/animating, as well as adding a number to Global Byte Alfa 1.

Every time you enter a level, secrets reset to zero, then a global trigger checks to see if a secret door is open and adds to the current secret number.

So now the secrets show correctly x/3, x/4, x/0, etc. Even while jumping back and forth.

I'll later add a trigger at the end of the game to check for the total value in Global byte Alfa1 for a secret level :)

Many thanks, Alex Chap!
Dark Skies loom...
https://youtu.be/TScjB7EjBlI

Post Reply

Who is online

Users browsing this forum: No registered users and 32 guests