Jump to content

Photo

tango.zh


  • Please log in to reply
398 replies to this topic

#196 Saffith

Saffith

    IPv7 user

  • Members

Posted 09 October 2015 - 06:53 PM

A new style is probably the easiest option. If the only difference is the items, you could use a single style, but change the backdrop data to use blank tiles for non-shop messages.

You could also just have the shop script draw the combos itself, as long as Tango isn't drawing on the highest possible layer. Another option would be a custom or extended font that has those tiles as characters, but that would be harder to set up.

#197 xenomicx

xenomicx

    Zelda Arcade

  • Members
  • Location:Chi-town

Posted 09 October 2015 - 07:57 PM

A new style is probably the easiest option. If the only difference is the items, you could use a single style, but change the backdrop data to use blank tiles for non-shop messages.

You could also just have the shop script draw the combos itself, as long as Tango isn't drawing on the highest possible layer. Another option would be a custom or extended font that has those tiles as characters, but that would be harder to set up.

I think you're right...a new style would be easiest, but then again there are different types of shops. I might just learn to create a new font...well, because I planned on it anyway. LOL Thanks!



#198 xenomicx

xenomicx

    Zelda Arcade

  • Members
  • Location:Chi-town

Posted 10 October 2015 - 09:20 AM

So I got the hang of creating an extended font by looking at the relationship between the Oracle Proportional font and  Oracle Extended font, both of which are used in tangoDemo.qst.

Now I've created a  GUI Extended font with one additional (so far) character at the end; a bomb. Now my question is, how do I type that in my string?

 

EDIT: I'm guessing it would be displayed by using @256...right? And if I add anymore @257, @258 etc...?

 

EDIT 2:  Yes, I'm correct! the extended font begins at @256. So now I can display shop items using tango!


Edited by xenomicx, 10 October 2015 - 10:10 AM.


#199 Deedee

Deedee

    Small Pixie Dragon

  • Administrators
  • Real Name:Deedee
  • Pronouns:She / Her, They / Them
  • Location:Canada

Posted 10 October 2015 - 10:16 AM

Okay, just asking, but how do I exit a menu with start? I'm kinda scripting my own subscreen here, and exiting with the B button feels awkward.

 

Also, a little unrelated, but do draw combo's animate when there is a screen freeze combo on the screen?


Edited by Dimentio, 10 October 2015 - 10:24 AM.


#200 Saffith

Saffith

    IPv7 user

  • Members

Posted 10 October 2015 - 10:40 AM

There are functions in the main file you can edit to change the controls. You want these two:
// Return Link->Press* for menu cancel button
bool __Tango_PressMenuCancel()
{
    return Link->PressB || Link->PressStart;
}

// Return Link->Input* for both menu select and cancel buttons
bool __Tango_InputMenu()
{
    return Link->InputA || Link->InputB || Link->PressStart;
}
Yes, drawn combos will still animate.

#201 xenomicx

xenomicx

    Zelda Arcade

  • Members
  • Location:Chi-town

Posted 12 October 2015 - 11:27 AM

Is it possible to run tango messages in an item pickup script? If so, can you help with this one...I'm running circles trying to figure out how to convert it. This is the Heart Piece Message script in the database by MoscowModder



#202 Saffith

Saffith

    IPv7 user

  • Members

Posted 12 October 2015 - 11:56 AM

You've already got a ShowMessage() function, so all you should need to do is replace the Screen->Message() calls. So you might replace
Screen->Message(m1);
with
ShowMessage(m1, TANGO_SLOT_NORMAL, STYLE_PLAIN, 32, 32);
and so forth.

#203 xenomicx

xenomicx

    Zelda Arcade

  • Members
  • Location:Chi-town

Posted 12 October 2015 - 01:47 PM

You've already got a ShowMessage() function, so all you should need to do is replace the Screen->Message() calls. So you might replace
Screen->Message(m1);
with
ShowMessage(m1, TANGO_SLOT_NORMAL, STYLE_PLAIN, 32, 32);
and so forth.

Gees...I knew that! That was the first thing I tried and when it didn't work, I've been rattling my brain trying different way. Then I realized I was misspelling the script wrong when I imported it. LOL



#204 Gégé

Gégé

    Senior

  • Members
  • Real Name:Gérard
  • Location:France

Posted 22 November 2015 - 02:35 PM

Hi. What are the coordinates to do the opposite? The pop-up window comes down from the top and then back up.
 
int movement[]="@while(@greater(@y 130) @inc(@y -3))@delay(120)@while(@less(@y 32) @inc(@y 3))";
 
Destination :
Tango_SetSlotPosition(slot, 64, 32);

Edited by Gégé, 22 November 2015 - 02:37 PM.


#205 Saffith

Saffith

    IPv7 user

  • Members

Posted 22 November 2015 - 03:37 PM

It depends partly on how tall the text box is. The Y position is the top of the box, so the start and end point has to be high enough that the whole thing is offscreen. Assuming it's 24 pixels, like the original version, the Y position needs to be -24 or less.
Using -24 and 32, it would be:
int movement[]="@while(@less(@y 32) @inc(@y 3))@delay(120)@while(@greater(@y -24) @inc(@y -3))";
If you want it to stop exactly at 32, the total distance needs to be a multiple of the step, so you'd use -25 instead.

#206 Gégé

Gégé

    Senior

  • Members
  • Real Name:Gérard
  • Location:France

Posted 22 November 2015 - 04:58 PM

Thank you, I understood the functioning. I succeeded ;).



#207 Gégé

Gégé

    Senior

  • Members
  • Real Name:Gérard
  • Location:France

Posted 24 November 2015 - 02:09 PM

Is it possible to combine two pop-up window that are not in the same place but can appear at the same time ? by 2 different ItemObtained scripts.

Edited by Gégé, 24 November 2015 - 04:07 PM.


#208 Saffith

Saffith

    IPv7 user

  • Members

Posted 24 November 2015 - 05:13 PM

Sure. The function that displays the messages will need some way of knowing where they should go. The easiest way would be to set the position based on the slot number.
If the pop-up slots are 1 and 2, that might look like:

int slot=Tango_GetFreeSlot(TANGO_SLOT_POPUP);
// Set up message here
if(slot==1)
    Tango_SetSlotPosition(slot, 16, -24);
else if(slot==2)
    Tango_SetSlotPosition(slot, 80, -24);

  • Gégé likes this

#209 Gégé

Gégé

    Senior

  • Members
  • Real Name:Gérard
  • Location:France

Posted 24 November 2015 - 06:05 PM

Thank you very much ;)

Edited by Gégé, 24 November 2015 - 06:06 PM.


#210 C-Dawg

C-Dawg

    Magus

  • Members

Posted 21 December 2015 - 02:43 PM

Hey, Saffith.

 

Do you know of a reason why a call to the ShowString function (the one that displays a zQuest string int[]) you wrote for the Demo Quest might result in the player's movement input being locked but no string appearing?  I haven't delved deeply into your code to see specifically.  I took your demo and made a few Styles based on the Navi style you did, the only differences being one Style makes a tiny little speech bubble and the other makes a full size one.  The tiny one works fine, but the larger one just locks the player permanently without displaying anything.

 

Anywhere I should start looking on this?

 

EDIT: Also, for a Style like Navis, where a character talks but does not interrupt the action, how do I tell Tango how long to leave the message displayed once it triggers?


Edited by C-Dawg, 21 December 2015 - 02:46 PM.



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users