Jump to content

Photo

Only one lockblock??


  • Please log in to reply
50 replies to this topic

#46 cosmofield

cosmofield

    Magical Girl

  • Members
  • Location:Sweden

Posted 02 February 2010 - 07:35 PM

I can't get any function in the Copycat script. I want another set of dummy blocks to change as soon as respectively lockblock is cleared. I am testing with a 9th lockblock now and have Copycat-script inside it, do D2 and D3 need to have the same values as a existing lockblock? It may had be answered earlier but I am a little dumb today. icon_unsettled.gif


#47 AgentLym

AgentLym

    • Zelda and Pokémon Master •

  • Members
  • Location:Skyloft

Posted 02 February 2010 - 08:17 PM

Well, it would be D2 and D3 if you were using the normal Lockblock script, but in the case of the copycat script, you have to change D0 to equal D2, and D1 to equal D3, see?

Well, here's a demonstration:

CODE
ffc script LockBlock{
    void run(int pushtime, int sfx, int perm, int d){
        if(pushtime == 0) pushtime = 10;
        int loc = ComboAt(this->X,this->Y);
//blah blah more code
}


Do you see the void run() line:
CODE
    void run(int pushtime, int sfx, int perm, int d){

This line calls into the code the arguments D0 through D7. They go in order: D0 = pushtime, D1 = sfx, D2 = perm, D3 = d, D4-7 = n/a.

In order for the Copycat script to work, you have to have 'perm' and 'd' equal. Here's the copycat script:
CODE
ffc script Copycat{
    void run(int perm, int d){
        while((Screen->D[d] & (1<<perm)) == 0) Waitframe();
        Screen->ComboD[ComboAt(this->X,this->Y)]++;
    }
}

See the void run() line here? It's different:
CODE
    void run(int perm, int d){

In this case, D0 = perm, and D1 = d. So, if you want it to copy another lockblock script, you're going to have to set D0 and D1 equal to the D2 and D3 of the first script, respectively.

Does that help at all?

#48 cosmofield

cosmofield

    Magical Girl

  • Members
  • Location:Sweden

Posted 02 February 2010 - 08:34 PM

Ahah, I understand what D0, D1 etc get data from icon_smile.gif

So FFC Lockblock's D2 and D3 should be same as copycat's D0 and D1, Both FFCs respective D values are 0.000 still not working though.

I am trying to accomplish this, any guess? icon_smile.gif

IPB Image

Edited by cosmofield, 02 February 2010 - 08:36 PM.


#49 AgentLym

AgentLym

    • Zelda and Pokémon Master •

  • Members
  • Location:Skyloft

Posted 02 February 2010 - 10:57 PM

The 'perm' (D2 and D0) should also be the same, as well as the 'd' (D3 and D1) of the LockBlock and Copycat, respectively.

If it doesn't work... I guess just check again! It should work now that you understand it. Though, be sure the copycat blocks also have the combo you want them to turn into directly to the right of them as well, just as the other Lockblocks do.

And I'm guessing some kind of 'unlock in a certain order or die' sorta room? icon_heh.gif

#50 cosmofield

cosmofield

    Magical Girl

  • Members
  • Location:Sweden

Posted 03 February 2010 - 07:35 AM

Yeah, I finally got the integers right, level 4 password reveals while unlocking each block.

I will however scrap that idea now, because I found out that Link can cheat in that room with F6/reset if Link has at only one or more keys. I will place lockblocks after each other with a 2nd tile warp to a password room instead icon_smile.gif

[solved]

#51 cosmofield

cosmofield

    Magical Girl

  • Members
  • Location:Sweden

Posted 15 February 2010 - 08:04 PM

I am back.., I recently changed to a newer linux build (1158) and suddenly none of these script works, I tried compile different versions in this topic, also the newest posted in script database, compile all OK but nothing happens when I test it, even when I load an old quest file (where script worked before), suddenly the scripts now does nothing when I re-compiled. icon_unsettled.gif

Edit: Found info on shardstorm that comboAt() function may be fixed now, works again in latest version, ignore this post.

Edited by cosmofield, 15 February 2010 - 08:45 PM.



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users