Jump to content

Photo

Permanent Combo Cycled Secrets


  • Please log in to reply
7 replies to this topic

#1 Mr. Z

Mr. Z

    Old Bastard is back!

  • Members
  • Real Name:Erik
  • Location:The Netherlands

Posted 14 June 2013 - 12:28 PM

I have some screens with permanent secrets on them which change into cycled combos. For example, I have a gate that has an opening animation. I want to prevent that animation from showing again when you re-enter the screen.

For a solution I was thinking of making invisible ffcs whose data is that of the combo at the end of the cycle. At screen entry they will then transfer their data to the combo under them.

 

But I have no idea how to do this next part:

How would you write a code that scans the screen for those ffcs+their location & data, and then modifies the screen? Or is there an easier way?



#2 RetraRoyale

RetraRoyale

    Doyen(ne)

  • Members

Posted 14 June 2013 - 12:50 PM

 

For a solution I was thinking of making invisible ffcs whose data is that of the combo at the end of the cycle. At screen entry they will then transfer their data to the combo under them.

 

 

I'm not sure what that means... Do you want to use the FFCs as animated gates? That seems needlessly complicated to me...

 

Why don't you just make an FFC scan the screen for the specified (animated) combos on screen init and replace them with the "cycled to" combos?

 

EDIT:

Ah, I see what you meant. You are thinking about it inefficiently. You won't want to use one FFC per combo. Instead, just use one FFC to change all the combos that you need changed. Regardless, you don't need to scan for FFCs, because presumably, you are just running an FFC script. (The FFC knows what it is, so why would it have to scan for itself?) Try to do what I said first.


Edited by RetraRoyale, 14 June 2013 - 12:57 PM.


#3 grayswandir

grayswandir

    semi-genius

  • Members

Posted 14 June 2013 - 01:25 PM

You could maybe write a global script like this:

// Some code here to update ScreenChanged every time through the loop by checking dmap and dmap screen.
 
// Open doors all the way.
if(ScreenChanged && Screen->State[ST_SECRET]) {
  Screen->TriggerSecrets();}

 

And then set the animating combos to have a secret flag set to their final position.

 

That way, when you enter a room, if the secrets are triggered, then this triggers them again, and the doors skip their animation.



#4 Mr. Z

Mr. Z

    Old Bastard is back!

  • Members
  • Real Name:Erik
  • Location:The Netherlands

Posted 14 June 2013 - 02:13 PM

You could maybe write a global script like this:

// Some code here to update ScreenChanged every time through the loop by checking dmap and dmap screen.
 
// Open doors all the way.
if(ScreenChanged && Screen->State[ST_SECRET]) {
  Screen->TriggerSecrets();}

And then set the animating combos to have a secret flag set to their final position.

 

That way, when you enter a room, if the secrets are triggered, then this triggers them again, and the doors skip their animation.

 

Thanks, that worked. I never thought of that possibility.



#5 aaa2

aaa2

    Wizard

  • Banned

Posted 15 June 2013 - 09:19 AM

Why not just use one of the screen->D[] numbers to save the secret number. Then in the global script whenever you enter a room with that secret number trigger as many secrets as this number is. If you now put a secret flag on those cycling combos that have the combos that finished cycling you can just by come script set this D number to the number that the secrets automatically get triggered to that point. I actually used the same thing to implement permanent tiered secrets which nobody save for a select few seemed to care about.



#6 Jamian

Jamian

    ZC enthusiast

  • Members

Posted 15 June 2013 - 09:24 AM

Is it actually possible to use a script to trigger, say, secret flag 16 but not secret flag 17?



#7 Mr. Z

Mr. Z

    Old Bastard is back!

  • Members
  • Real Name:Erik
  • Location:The Netherlands

Posted 15 June 2013 - 09:35 AM

Is it actually possible to use a script to trigger, say, secret flag 16 but not secret flag 17?

 

You could make a script change a combo that has flag 16 on it into whatever you want it to become, without actually triggering the screen's secret.

Like:

            if(Screen->ComboF[index]==CF_SECRETS01){
                Screen->ComboF[index]=CT_NONE;
                Screen->ComboD[index]=NEW_COMBO;

             }

 

Why not just use one of the screen->D[] numbers to save the secret number.

 

You can do that? :O



#8 Evan20000

Evan20000

    P͏҉ę͟w͜� ̢͝!

  • Members
  • Real Name:B̵̴̡̕a҉̵̷ņ̢͘͢͜n̷̷ę́͢d̢̨͟͞
  • Location:B̕҉̶͘͝a̶̵҉͝ǹ̵̛͘n̵e̸͜͜͢d҉̶

Posted 15 June 2013 - 10:49 AM

Sure. It would be kind of hackish I think, but you could definitely write to the screen's D values (or even stuff like Boss Chest/Boss Lock that you're not using) to create more complex secret systems than ZC typically allows.

 

There's probably a much cleaner way to do something like this though, although I'm unsure of what that would be.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users