Jump to content

Photo

I'm writing two scripts of my own!!!!!


  • Please log in to reply
18 replies to this topic

#1 ZebraStallion

ZebraStallion

    Follower of Destiny

  • Members

Posted 11 November 2008 - 10:17 AM

I used Joe123's press start script as a base for these...


This script is supposed to warp you somewhere when you press start. No this is not like the title screen script.

CODE
const int CMB_AUTOWARP        = 0; //Combo ID of an autowarp combo

ffc script subscreensubstitute{
    void run(int dly){
        Waitframes(dly);
        Screen->DrawTile(CMB_AUTOWARP)
        while(!Link->InputStart){


The next script is a script that will draw a tile in the upper right part of the screen for a few seconds after a string is played.
D0 is supposed to be the string... icon_sorry.gif

CODE
const int T_TILE        = 0; //Tiles tiles to draw on screen
const int startwidth        = 0; //Tilewidth of the tiles
const int startheight        = 0; //Tileheight of the tiles
const int startcset            = 0; //CSet of the tiles

ffc script task{
    void run(int dly){
        Waitframes(dly);
        If String->Finished
Screen->DrawTile(5,this->X,this->Y,T_TILE,startwidth,startheight,startcset,1,0,0,0,0,true,128);
        Waitframe();
Screen->DrawTile(5,this->X,this->Y,T_TILE,startwidth,startheight,startcset,1,0,0,0,0,true,128);
        Waitframe();
        }
        T_TILE->Flash
    }
}




These are probably no where near how they should be, so help would be appreciated. Thanks!



#2 Saffith

Saffith

    IPv7 user

  • Members

Posted 11 November 2008 - 11:01 AM

Did the first one get truncated, or is it not finished yet? Except for the DrawTile(), it looks fine so far.


For the second, there is, unfortunately, no way to tell the state of a string. You can't tell whether it's still being printed or even if it's still onscreen . The best you're going to be able to do with that is call DrawTile() in a for loop

#3 ZebraStallion

ZebraStallion

    Follower of Destiny

  • Members

Posted 11 November 2008 - 11:25 AM

QUOTE(Saffith @ Nov 11 2008, 10:01 AM) View Post

Did the first one get truncated, or is it not finished yet? Except for the DrawTile(), it looks fine so far.
For the second, there is, unfortunately, no way to tell the state of a string. You can't tell whether it's still being printed or even if it's still onscreen . The best you're going to be able to do with that is call DrawTile() in a for loop

The first one actually is finished, and the reason I posted it here is to get some help with it. (It's my first script...)

And for the second one, are you sure I can't make something appear after a message is displayed? Because I know there's a script where you can warp after the message... (Or is that an in game feature...)

#4 Christian

Christian

    Summoner

  • Members
  • Real Name:Chris
  • Location:New Jersey

Posted 11 November 2008 - 11:58 AM

CODE
const int autowarp=0; //set here the combo i.d of any warp combo can be any if you want . ffc script PressA_Warp{             void run(int dly)//D0 Number of frames to wait before you can press a to warp after a message string is displayed.0 Waitframes(dly); while(true){ dly--; if (dly>0){} else{  if(Link->InputA){ Link-InputA= false; screen-data=autowarpcombo;      }                              }


#5 LinktheMaster

LinktheMaster

    Hey Listen, Kid

  • Members
  • Real Name:Matt
  • Location:United States

Posted 11 November 2008 - 01:17 PM

drzchulo's method only works if you have have the rule to freeze all movement with strings displayed.

What Saffith said is incorrect. You can tell when a string is finished, but it requires more work. Using string modifiers, you can manipulate game counters in order to show when a string has ended. It's a method I've used to show sprites during conversation, and it works out fairly well. icon_shrug.gif

#6 Joe123

Joe123

    Retired

  • Members

Posted 11 November 2008 - 01:31 PM

QUOTE(LinktheMaster @ Nov 11 2008, 06:17 PM) View Post
drzchulo's method only works if you have have the rule to freeze all movement with strings displayed.


Just out of interest, why would you not have that rule set?

#7 LinktheMaster

LinktheMaster

    Hey Listen, Kid

  • Members
  • Real Name:Matt
  • Location:United States

Posted 11 November 2008 - 03:21 PM

There may be several reasons. The main one is that you may want conversations to take place with moving ffcs. icon_shrug.gif Just depends on what you want, really.

#8 Joe123

Joe123

    Retired

  • Members

Posted 11 November 2008 - 04:20 PM

Oh right ok.
I just have the ffcs move, then play a string, then move some more.

But fair enough.

#9 ZebraStallion

ZebraStallion

    Follower of Destiny

  • Members

Posted 14 December 2008 - 06:20 PM

I'm still a little confused with this. It seems that Christian's script deals with pressing A, I need it to be start. Also, how would I do the second one?

#10 Bourkification

Bourkification

    Magus

  • Members

Posted 14 December 2008 - 07:30 PM

I think to change it to work with the start button, just replace all instances of InputA with InputStart.

#11 Christian

Christian

    Summoner

  • Members
  • Real Name:Chris
  • Location:New Jersey

Posted 14 December 2008 - 08:04 PM

That would be how to do it. Change the ffc name to PressStart. And replace InputA with InputStart. D0 is the number of frames to wait before you press start from the titlescreen to warp link.

#12 ZebraStallion

ZebraStallion

    Follower of Destiny

  • Members

Posted 14 December 2008 - 10:13 PM

QUOTE(Christian @ Dec 14 2008, 07:04 PM) View Post

That would be how to do it. Change the ffc name to PressStart. And replace InputA with InputStart. D0 is the number of frames to wait before you press start from the titlescreen to warp link.

Well, I was actually going to use it for a fake subscreen...

#13 Christian

Christian

    Summoner

  • Members
  • Real Name:Chris
  • Location:New Jersey

Posted 14 December 2008 - 11:02 PM

It works for whatever you want it to be. As far as your other script,theres alot of mistakes. Those const int on top of it are unnecessary. The tile->flash statement does not exist and you can make the tile appear after a message is displayed. The two drawtile statements are unecessary also. If you want i could post my versions of your script and teach you. Also you never capitilize an if,while,or for loops.

#14 Joe123

Joe123

    Retired

  • Members

Posted 15 December 2008 - 10:21 AM

A fake subscreen?
Are you planning on re-scripting the subscreen?

You do realise that you'd have to re-script all of Link's items if you were going to do that, right?

#15 ZebraStallion

ZebraStallion

    Follower of Destiny

  • Members

Posted 15 December 2008 - 04:15 PM

QUOTE(Joe123 @ Dec 15 2008, 09:21 AM) View Post

A fake subscreen?
Are you planning on re-scripting the subscreen?

You do realise that you'd have to re-script all of Link's items if you were going to do that, right?

Just for one part, when one guy explains task items on the subscreen. He'll be like, "Press start to open the subscreen." You do and there will be a string on there explaining it and the task items will be highlighted.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users