Jump to content

Photo

item warp


  • Please log in to reply
7 replies to this topic

#1 accela2me

accela2me

    Illustrious

  • Members
  • Real Name:Juliano
  • Location:Minas Gerais, Brazil

Posted 06 October 2012 - 08:37 PM

I tested a script written by Joe123 some time ago, but the script didn't work.
It worked the way I wanted when I applied the script in a FFC, but not in an item.
I don't know if I didn't set right or if this script doesn't really work with ZC RC4 version...

CODE
const int ITEM_AUTOWARP = 51; //Set the ID of an auto-warp A combo here

item script ItemWarp
{
    void run(){
        ffc f = Screen->LoadFFC(32);
        f->Data = ITEM_AUTOWARP;
    }
}



#2 cavthena

cavthena

    Apprentice

  • Members
  • Real Name:Clayton
  • Location:I wish I knew

Posted 07 October 2012 - 04:45 PM

I take it your looking for an item that works like the mirror from alttp?

#3 accela2me

accela2me

    Illustrious

  • Members
  • Real Name:Juliano
  • Location:Minas Gerais, Brazil

Posted 07 October 2012 - 06:02 PM

Not exactly.
I want a script that is applied to an item found in the last room of a dungeon and that activates a sidewarp for the entry of this dungeon.

As I said before, I adapted the script to run on a FFC and it worked perfectly ... but I want this script on an item! :)

#4 accela2me

accela2me

    Illustrious

  • Members
  • Real Name:Juliano
  • Location:Minas Gerais, Brazil

Posted 13 October 2012 - 12:09 PM

Is there a way to emulate an item to carry Link to outside a temple in the same way that a Triforce Piece?

#5 cavthena

cavthena

    Apprentice

  • Members
  • Real Name:Clayton
  • Location:I wish I knew

Posted 13 October 2012 - 02:20 PM

Here you go. Some item warp scripts.

If the item is unique use this script. Set the D values to the dmap and screen you want to warp too and it'll take care of the rest.
CODE

//D0: DMap to warp Link too.
//D1: Screen to warp Link too.
item script Teleport
{
    void run(int DMap, int Screen)
    {
        Link->Warp(DMap, Screen);
    }//end run
}//end item


If the item is used multiple times use these scripts. Set the "const int scriptNum" to the number of the script you assign the ffc to and set the "const int instaCombo" to a Auto Side Warp[A] combo. Once you do that add the item script to any item and it'll take care of the rest. No need to set the FFC on the screen. You'll need ffcscript.zh to run this code!
CODE

const int scriptNum = 0;

item script InstawarpItem
{
    void run()
    {
        RunFFCScript(scriptNum, NULL);
    }//end run
}//end item

//-----Following is an ffc!------

const int instaCombo = 0;

ffc script InstawarpFFC
{
    void run()
    {
        this->Data = instaCombo;
    }//end run
}//end ffc


Not tested. Let me know if there are problems!

Edited by cavthena, 13 October 2012 - 06:05 PM.


#6 accela2me

accela2me

    Illustrious

  • Members
  • Real Name:Juliano
  • Location:Minas Gerais, Brazil

Posted 13 October 2012 - 05:44 PM

The 1st script works, but not the way I want.
The 2nd script is what I need. The problem is that nothing happens when I pick up the item.

#7 cavthena

cavthena

    Apprentice

  • Members
  • Real Name:Clayton
  • Location:I wish I knew

Posted 13 October 2012 - 06:03 PM

ok I tested it and it worked fine for me.

Just want to make sure that you set the right variables and arguments.
First the scriptNum is the slot you place the FFC script in during the compile.

second is, I'm an idiot. I said "instant tile warp combo" above. It's suppose to be "Auto Side Warp [A]" combo type. You then set the side warp on the screen as normal.

#8 accela2me

accela2me

    Illustrious

  • Members
  • Real Name:Juliano
  • Location:Minas Gerais, Brazil

Posted 14 October 2012 - 01:10 PM

Ahaa! It worked! icon_lol.gif
Thanks so much, dude!


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users