Jump to content

Photo

change FFC premanently


  • Please log in to reply
7 replies to this topic

#1 nyrox

nyrox

    Junior

  • Members
  • Location:Québec

Posted 11 May 2020 - 04:36 PM

I would like to know how to reverse the ffc LoadFFC (int num) command; after changing the pointer data, you can return the value to permanently change the FFC in 2.53

 

 

i load a pointer like this

 

ffc Bread;

Bread = Screen->LoadFFC(6);
Bread->Script= 33;
Bread->X= 32;
blblabla for input data inside the pointer
 
i want this return the Bread data in the FFC 6 permently on the screen data when we come back
 on this screen the new FFC 6 run with new data

Edited by nyrox, 11 May 2020 - 05:02 PM.


#2 Moosh

Moosh

    Tiny Little Questmaker

  • ZC Developers

Posted 11 May 2020 - 05:27 PM

Changes to FFCs in 2.53 are always temporary. You'd need some other way to record that the FFC had changed. The way most of us do this is by writing to Screen->D[] but for that you need to manage how you're storing your data. For example storing what exactly Bread's script and position were set to is a big waste of data when you could be storing the fact that it had been changed at all as a boolean and then have the script reproduce the changes when it's flagged as true. You can cram 17 of those into one Screen->D[] register but for just getting started you may as well use a full register for each event flag. Just keep in mind that there's only 8 of them per screen.



#3 nyrox

nyrox

    Junior

  • Members
  • Location:Québec

Posted 11 May 2020 - 06:15 PM

the other try a make is 

 

1- i put  a script  in FFC(11). this script change value of FFC(6) if i have 2  quest done in the game with the flag run at screen init

2- i put the run at screen init flag on the FFC(11)

 

the result i see the change of FFC(6) after the screen load  


a good i just inverse the FFC6 with 11

 

ffc6 make the change of f11 and f11 load after the change is make before screen load

 

in conclusion the FFC load in order 



#4 Emily

Emily

    Scripter / Dev

  • ZC Developers

Posted 11 May 2020 - 07:19 PM

If you want to be able to make changes to FFCs permanently, use 2.55. Between 'mapdata' and 'SRAM' stuff, you can permanently change things.



#5 Jamian

Jamian

    ZC enthusiast

  • Members

Posted 12 May 2020 - 05:49 AM

the other try a make is 

 

1- i put  a script  in FFC(11). this script change value of FFC(6) if i have 2  quest done in the game with the flag run at screen init

2- i put the run at screen init flag on the FFC(11)

 

the result i see the change of FFC(6) after the screen load  


a good i just inverse the FFC6 with 11

 

ffc6 make the change of f11 and f11 load after the change is make before screen load

 

in conclusion the FFC load in order 

 

Is there a reason why you don't perform the check on FFC 6 directly? 



#6 nyrox

nyrox

    Junior

  • Members
  • Location:Québec

Posted 12 May 2020 - 10:06 AM

a make the check script on  the FFC6  to put a script on FFC11 and i want this script i put on F11 do his job in the screen init. the script on FFC11 is my scrip tshop and All the D slot is used  ...  i wanted a method to change FFC11 permentaly but the result is good for me



#7 Jamian

Jamian

    ZC enthusiast

  • Members

Posted 12 May 2020 - 10:13 AM

If I understand correctly, you have an FFC with no other purpose than to perform checks, and update another FFC based on those checks. Why not perform the check directly in the FFC that needs to be updated?



#8 nyrox

nyrox

    Junior

  • Members
  • Location:Québec

Posted 12 May 2020 - 09:35 PM

the screen is a bakery and we have to bring ingredients to make items for sale.

So the first FFC checks if the ingredient has been brought back and activated the FFCs of the item sold with  a shop script.

My shop script works perfectly and already take the 8 Ds []. each item sold in the shop is a FFC.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users