Jump to content

Photo

Press A to Warp?


  • Please log in to reply
3 replies to this topic

#1 link3505

link3505

    Ancient

  • Members
  • Real Name:Ben
  • Location:The Edge of Infinity

Posted 16 October 2007 - 01:09 AM

Is there any way to make a script that, preferably after a string finishes, the player can press a button/key (Any used by ZC) to initiate a warp to another screen?

I know jack-**** about what scripting can do for ZC, so I apologize if this has been thought of/attempted and failed before

#2 Joe123

Joe123

    Retired

  • Members

Posted 16 October 2007 - 01:54 AM

CODE
ffc script a_combo{ //start script
    void run(int dly, int combo){ //start void run
        while(true){ //start while loop
            dly--;
            if(dly>0){} //if
            else{ //start else
                if(Link->InputA){ //start if
                Link->InputA = false;
                this->Data=(combo);
                this->X = Link->X;
                this->Y = Link->Y;
                } //end if
            } //end else
        Waitframe();
        } //end while loop
    } //end void run
} //end script


Just what I needed the other week.
Stick it on an ffc in the room. Create an combo that's 'auto-warp' type, and has no graphic. Place it nearish to the begining of the combo list, because FFC arguments can't handle integers past a certain size (which I forget). The first argument in the FFC is the delay that it takes untill you are warped, for a room with a string, this needs to about 5 or 10, so that you can't get warped by pressing A before the string appears. You also need the 'Messages Freeze All Action' quest rule checked. The second argument is the number of the combo (which has to be an auto-warp combo). Then set the room's sidewarp for that A,B,C,or D autowarp combo. Works a charm.

#3 Alestance

Alestance

    Saint Alestance - Eliminator of the ZGP format

  • Members
  • Real Name:Lonk
  • Location:Pennsylvania

Posted 16 October 2007 - 05:09 AM

actually... I don't even think thats nessicary.

there is a function

Link -> Warp

and

Link -> PitWarp

icon_shrug.gif

#4 Joe123

Joe123

    Retired

  • Members

Posted 16 October 2007 - 11:11 AM

I'm aware of the functions Link->Warp and Link->PitWarp, however if you use those you can only have an 'insta-warp' type warp. This is quite limiting. It is also very akward using the script warp destination system, in comparision to the tilewarp destination system we're all used to. This is why I have an auto-warp combo; it is intentionally like this.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users