Jump to content

Photo

Press A next to an NPC to activate a warp


  • Please log in to reply
21 replies to this topic

#16 coolgamer012345

coolgamer012345

    🔸

  • Members
  • Location:Indiana, USA

Posted 23 February 2013 - 05:32 PM

ok i will try using it

#17 Peteo

Peteo

    Back in Business!

  • Members
  • Real Name:Pete
  • Location:Finland

Posted 23 February 2013 - 05:55 PM

QUOTE(MoscowModder @ Feb 23 2013, 11:52 PM) View Post

Peteo, if you could post a mockup of what you want the "bubbles" and portrait to look like, I bet I could replicate it without warps. That way, you won't have enemies and whatnot vanish when you talk to people or read signs (a pet peeve of mine in pre-2.5 quests).

Just take a look at the video ShadowTiger posted earlier in this thread, talking in my quest will work exactly like that. And about your pet peeve, isn't there a screen flag for carrying enemies over to the next screen? That should take care of the disappearing enemies.

But thank you for the script! icon_thumbsup.gif
However, I still have to bother you (or whoever wants to do it) to make that script coolgamer came up with. An FFC combo that acts as a warp and can be only actrivated by a press of a button. That should be possible, right? I could find some cool uses for a script like that. Again, no hurry, but if someone eventually figures out how to do it I would be a really happy and grateful man.

Edited by Peteo, 23 February 2013 - 05:56 PM.


#18 coolgamer012345

coolgamer012345

    🔸

  • Members
  • Location:Indiana, USA

Posted 23 February 2013 - 06:11 PM

hey thanks peteo,i would be using it in my Oot quest....i need to come up with a cool name for the project....hmm....anyway i am getting off topic again.i dont know but i think if a script was made it could be edited very easy to make it a/n A,B,C, or D warp,i think if someone does come up with the cript i think that would be a nice feature

#19 MoscowModder

MoscowModder

    Sometimes lurking. Rarely posting.

  • Members
  • Location:Wisconsin

Posted 23 February 2013 - 06:11 PM

You can use that warping NPC script I posted for that. In the meantime, I'll have a look at that video.

Edit: So, it looks like it's just a string with a background (again, included with the string) plus scripted portraits?

#20 Moosh

Moosh

    Tiny Little Questmaker

  • ZC Developers

Posted 23 February 2013 - 06:48 PM

So here's a little NPC script I made that could probably work for what you want. It requires ffcscript.zh as well as std.zh.

CODE
const int C_TALK = 0;
const int CS_TALK = 0;

ffc script Guy{
    void run(int string, int onlydir, int run_script){
        while(true){
            if(Link->X>=this->X-8&&Link->X<=this->X+16*this->TileWidth-8&&Link->Y==this->Y+this->TileHeight*16-8&&onlydir!=0&&onlydir!=2&&onlydir!=3){
                Screen->FastCombo(3, Link->X+8, Link->Y-16, C_TALK, CS_TALK, 128);
                if(Link->Dir==DIR_UP&&Link->PressA){
                    Link->InputA=false;
                    Screen->Message(string);
                    if(run_script>0){
                        RunFFCScript(run_script, 0);
                    }
                }
            }
            else if(Link->Y>=this->Y-8&&Link->Y<=this->Y+16*this->TileHeight-16&&Link->X==this->X-16&&onlydir!=0&&onlydir!=1&&onlydir!=3){
                Screen->FastCombo(3, Link->X+8, Link->Y-16, C_TALK, CS_TALK, 128);
                if(Link->Dir==DIR_RIGHT&&Link->PressA){
                    Link->InputA=false;
                    Screen->Message(string);
                    if(run_script>0){
                        RunFFCScript(run_script, 0);
                    }
                }
            }
            else if(Link->X>=this->X-8&&Link->X<=this->X+16*this->TileWidth-8&&Link->Y==this->Y-16&&onlydir!=1&&onlydir!=2&&onlydir!=3){
                Screen->FastCombo(3, Link->X+8, Link->Y-16, C_TALK, CS_TALK, 128);
                if(Link->Dir==DIR_DOWN&&Link->PressA){
                    Link->InputA=false;
                    Screen->Message(string);
                    if(run_script>0){
                        RunFFCScript(run_script, 0);
                    }
                }
            }
            else if(Link->Y>=this->Y-8&&Link->Y<=this->Y+16*this->TileHeight-16&&Link->X==this->X+this->TileWidth*16&&onlydir!=0&&onlydir!=1&&onlydir!=2){
                Screen->FastCombo(3, Link->X+8, Link->Y-16, C_TALK, CS_TALK, 128);
                if(Link->Dir==DIR_LEFT&&Link->PressA){
                    Link->InputA=false;
                    Screen->Message(string);
                    if(run_script>0){
                        RunFFCScript(run_script, 0);
                    }
                }
            }
            Waitframe();
        }
    }
}

Set C_TALK and CS_TALK to the combo and cset to use for the indicator graphic. This appears above Link's head when he can talk to an NPC.
D0: The string to play when you talk to the NPC (in your case this would be 0)
D1: Set this to -1 if the NPC can talk to you in any of the 4 directions. Set it to one of the first four DIR_ constants in std_constants.zh if you want the NPC to be facing in one direction.
D2: If this is greater than 0, the FFC script in the indicated slot will run after you talk with the NPC.

CODE
const int C_WARP=0;

ffc script Warp{
    void run(){
        Waitframe();
        this->X=Link->X;
        this->Y=Link->Y;
        this->Data=C_WARP;
    }
}

For this script, set C_WARP to a blank sensitive warp combo. This will warp you after the NPC plays its string.

Example quest


#21 coolgamer012345

coolgamer012345

    🔸

  • Members
  • Location:Indiana, USA

Posted 23 February 2013 - 08:43 PM

hmm...i thought of a nonscript way of warping,what would do is make a trigger-> next combo them the next one would be a sensitive warp,that warps you to a copy of the room..of course you would have to use like a bush trigger and mke the rooms tile warp insta,and you would have to have item that makes it move....hmm...i think fccs would be much easier anyway.

#22 Da Masta Sord

Da Masta Sord

    The Official Masta Sord of ZC.

  • Members
  • Location:In a pedastal in the lost woods.

Posted 03 May 2013 - 01:26 PM

I talk to the npc, and a random tile appears in the top left corner of the screen, here is my setup .

Posted Image


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users