Jump to content

Photo

Total noob question, but...


  • Please log in to reply
24 replies to this topic

#16 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 25 April 2017 - 06:38 PM

Ok, so I tried setting the combos to type Script 5, and plugging it in, as was shown above, but it won't compile (gives the same error as above, Line 131: unexpected identifier, expecting RParen on token and tmp.) What did I do wrong here?
 
ffc script Song_Obstacle
{
    void run (int SFX, int Combo1, int Combo2, int Combo3, int Combo4, int Combo5, int Combo6, int trigger)
{
Game->PlaySound(SFX);
if (Screen->ComboT[ComboAt(Link->X+8 and Link->Y+8)] == CT_SCRIPT5)
{
  for (int i = 0; i < 176; i++) 
{
  if (Screen->ComboD[i] == Combo1) 
  {
        Screen->ComboD[i] = Combo2;
  }       
  if (Screen->ComboD[i] == Combo3) 
  {
        Screen->ComboD[i] = Combo4;
  }
  if (Screen->ComboD[i] == Combo5) 
  {
        Screen->ComboD[i] = Combo6;
  }

}  
}
}
}



I just don't see what I did wrong, here. What I'm trying to do is make sure it only changes the combos if Link is standing on the right combo type.
 
EDIT: The error it gives is at the if statement, so I know that's what's wrong, I just don't know HOW it's wrong.

Edited by Binx, 25 April 2017 - 06:41 PM.


#17 Saffith

Saffith

    IPv7 user

  • Members

Posted 25 April 2017 - 06:53 PM

That should be && instead of and.

#18 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 25 April 2017 - 06:56 PM

Oh, that's it, wow I can't believe I missed that.

Ok, now it says "Line 131: Error T21: Could not match type signature ComboAt(bool)" So, I missed something, still.

Edited by Binx, 25 April 2017 - 07:00 PM.


#19 coolgamer012345

coolgamer012345

    🔸

  • Members
  • Location:Indiana, USA

Posted 25 April 2017 - 07:07 PM

I think that '&&' or 'and' should be a comma, since you're passing two arguments to the function.



#20 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 25 April 2017 - 07:11 PM

Yeah, that just occurred to me (right before I read your reply), and it was the problem, it works, now. Now, I just need to figure out exactly how many frames each song lasts for, and implement the screen freezing, and I'll be good to go.


Edited by Binx, 25 April 2017 - 07:12 PM.


#21 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 25 April 2017 - 08:16 PM

Ok, I screwed it up again, I'm guessing it was my attempt to create a function to freeze the screen, but now it doesn't work again:
void ScreenFreeze()
{
    ffc ScreenFreeze = Screen->LoadFFC(33);
    ScreenFreeze->Data = 1114;
    
}

void ScreenUnfreeze()
{
    ffc ScreenUnfreeze = Screen->LoadFFC(33);
    ScreenUnfreeze->Data = 0;
    
}

item script SONG_OBSTACLE
{
    void run (int SFX, int Combo1, int Combo2, int Combo3, int Combo4, int Combo5, int Combo6, int FreezeTime)
    {
        int Song_Obstacle[] = "Song_Obstacle";
        int Args[8] = {SFX, Combo1, Combo2, Combo3, Combo4, Combo5,Combo6, FreezeTime};
        RunFFCScript(Game->GetFFCScript(Song_Obstacle), Args);
    }
}

ffc script Song_Obstacle
{
    void run (int SFX, int Combo1, int Combo2, int Combo3, int Combo4, int Combo5, int Combo6, int FreezeTime)
{
ScreenFreeze();
Game->PlaySound(SFX);
Waitframes(FreezeTime);
ScreenUnfreeze();
if (Screen->ComboT[ComboAt(Link->X+8, Link->Y+8)] == CT_SCRIPT5)
{
  for (int i = 0; i < 176; i++) 
{
    
  if (Screen->ComboD[i] == Combo1) 
  {
        Screen->ComboD[i] = Combo2;
  }       
  if (Screen->ComboD[i] == Combo3) 
  {
        Screen->ComboD[i] = Combo4;
  }
  if (Screen->ComboD[i] == Combo5) 
  {
        Screen->ComboD[i] = Combo6;
  }

}  
}
}
}



EDIT: The combo type at 1114 is "Screen Freeze (Except FFCs)"

Edited by Binx, 25 April 2017 - 08:18 PM.


#22 Jamian

Jamian

    ZC enthusiast

  • Members

Posted 26 April 2017 - 06:57 PM

There are 32 slots available for FFCs. Change Screen->LoadFFC(33) therefore can't work. Change it to 32.



#23 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 26 April 2017 - 09:22 PM

Oh, yep that was my dumb mistake. Thanks, the basic songs are now working perfectly, now just gotta do the warp songs, but those should be pretty easy, now that I have the freezing thing worked out (and also, I won't need them for at least two releases).


Edited by Binx, 26 April 2017 - 09:23 PM.


#24 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 28 April 2017 - 06:35 PM

One more question: Is there a way to pause the DMap midi while the song plays? It's not the end of the world, if not, but it would be nice.



#25 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 29 April 2017 - 03:08 AM

One more question: Is there a way to pause the DMap midi while the song plays? It's not the end of the world, if not, but it would be nice.


Not in 2.5, but you will be happy to know, that I did add that to future versions. (Pausing any music, or sound effect.)

Welcome back Bind. We all miss you on Skype.
  • Binx likes this


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users