User Tag List

Results 1 to 5 of 5

Thread: [Request]Lifting Gate

  1. #1
    Lynel Majora's Avatar
    Join Date
    Mar 2006
    Age
    32
    Posts
    1,197
    Mentioned
    24 Post(s)
    Tagged
    7 Thread(s)
    vBActivity - Stats
    Points
    4,385
    Level
    20
    vBActivity - Bars
    Lv. Percent
    93.35%

    [Request]Lifting Gate

    Should be simple I hope. I think I'll even take a crack at it. In the meantime, can someone whip up a script wherein:

    The player plays a specific whistle item that the script checks for on the trigger flag. Player input is disabled while a solid FFC vibrates, plays a sound, then starts to move as it plays another sound. It moves a certain distance at a certain speed and plays a third and final sound when it stops, after which player input is restored. Then the FFC stops being solid and becomes overhead. The FFC remains permanently open.

    D0 First of three sequential SFX
    D1 X distance
    D2 Y distance
    D3 X Speed
    D4 Y Speed
    D5 Whistle item #. (My quest uses multiple for different songs.)
    D6
    D7

    This all kind of hinges specifically on whether or not it is possible to check that a SPECIFIC whistle item has been played. Or to put it in layman's terms, a specific song is required.

  2. #2
    Lynel Majora's Avatar
    Join Date
    Mar 2006
    Age
    32
    Posts
    1,197
    Mentioned
    24 Post(s)
    Tagged
    7 Thread(s)
    vBActivity - Stats
    Points
    4,385
    Level
    20
    vBActivity - Bars
    Lv. Percent
    93.35%
    Yeah I can't figure it out.

    So to recap:

    One FFC which rumbles and lifts up after the player stands on another FFC and uses/plays a specific whistle item (my quest has multiple, for multiple songs). The FFC that moved never resets, is initially solid, and finishes as a non-solid overhead.


    This is as far as I got before giving up.
    Code:
    //An attempt at a script that causes an FFC to move in a specified direction at a//specified speed for a specified distance after a specified item has been used
    //while standing on a specified FFC. In short: A gate that lifts after playing the whistle 
    //on a "pedestal". The FFC is also solid until it moves, after which it becomes overhead.
    
    
    //int DisY; //How far to move
    //float VelY; //How fast
    //int RmblSFX; //sequential
    //int REQ_SONG; // item ID
    bool OnTarget; // is link standing on the thing
    bool IsPlaying; // is link playing the thing
    
    
    
    
    ffc script LiftingGate {void run (int DisY, int VelY, int RmblSFX) 
    
    
    { int tho = (this->TileHeight*16-16); //2
    { if ((Abs(Link->X - this->X) < 10) && (Link->Y <= this->Y+tho + 12) && (Link->Y > this->Y+tho+8))
    {Link->Y = this->Y+tho+12;}
      if ((Abs(Link->Y - this->Y-tho) < 10) && (Link->X >= this->X - 12) && (Link->X < this->X-8))
    {Link->X = this->X-12;}
      if ((Abs(Link->X - this->X) < 10) && (Link->Y >= this->Y+tho - 12) && (Link->Y < this->Y+tho-8))
    {Link->Y = this->Y+tho-12;}        
      if ((Abs(Link->Y - this->Y-tho) < 10) && (Link->X <= this->X + 12) && (Link->X > this->X+8))
    {Link->X = this->X+12;}                
    }
    
    
    { 
    int delay = 180;
    int posX = this->X;
    if (OnTarget == true && IsPlaying == true){
    while(delay) {
    						delay--;
    						this->X = posX + Rand(2);	
    						Game->PlaySound(RmblSFX);	
    						Waitframe();
    					}
    
    
    
    
    }}}
    }
    
    
    ffc script WhistlePad { // 1 
    void run(int ReqSong) 
    {if ((GetEquipmentB() == ReqSong && Link->InputB) || (GetEquipmentA() == ReqSong && Link->InputA)) IsPlaying = true;
    {if ((Abs(Link->X - this->X) < 8 ) && (Abs(Link->Y - this->Y) < 8)) OnTarget = true; 
    }
    }
    
    
    }
    Last edited by Majora; 04-16-2014 at 09:49 PM.

  3. #3
    Admiral Zim's Avatar
    Join Date
    Oct 2012
    Posts
    388
    Mentioned
    9 Post(s)
    Tagged
    2 Thread(s)
    vBActivity - Stats
    Points
    1,699
    Level
    13
    vBActivity - Bars
    Lv. Percent
    82.73%
    There are ffc key doors in zim.qst that would be the same thing, you'd just have to change the required item to whistle, add the sounds, and adjust the parameters for where Link has to be standing, as it works with directly in front of the doors as is.

  4. #4
    Username Kaiser SUCCESSOR's Avatar
    Join Date
    Jul 2000
    Location
    Winning.
    Age
    37
    Posts
    4,436
    Mentioned
    152 Post(s)
    Tagged
    7 Thread(s)
    vBActivity - Stats
    Points
    10,560
    Level
    30
    vBActivity - Bars
    Lv. Percent
    51.7%
    Quote Originally Posted by Majora View Post
    Should be simple I hope. I think I'll even take a crack at it. In the meantime, can someone whip up a script wherein:

    The player plays a specific whistle item that the script checks for on the trigger flag. Player input is disabled while a solid FFC vibrates, plays a sound, then starts to move as it plays another sound. It moves a certain distance at a certain speed and plays a third and final sound when it stops, after which player input is restored. Then the FFC stops being solid and becomes overhead. The FFC remains permanently open.

    D0 First of three sequential SFX
    D1 X distance
    D2 Y distance
    D3 X Speed
    D4 Y Speed
    D5 Whistle item #. (My quest uses multiple for different songs.)
    D6
    D7

    This all kind of hinges specifically on whether or not it is possible to check that a SPECIFIC whistle item has been played. Or to put it in layman's terms, a specific song is required.
    Sorry, I missed this. I took a prolonged break from ZC. Now that I started dicking around with ZScript again I'll take a crack at it if you still need it. It doesn't seem hard to do. Will there potentially be enemies on screen that need to be frozen or do you just want Input disabled?

    Just realized you were going to use a custom item. My reedin Rn't to good! Can you explain the custom item and does it have a script attached?

  5. #5
    Lynel Majora's Avatar
    Join Date
    Mar 2006
    Age
    32
    Posts
    1,197
    Mentioned
    24 Post(s)
    Tagged
    7 Thread(s)
    vBActivity - Stats
    Points
    4,385
    Level
    20
    vBActivity - Bars
    Lv. Percent
    93.35%
    No script on the custom item. It's just a higher-leveled Whistle item that plays a different WAV.

    There was a single enemy on the screen but I can get rid of it. Just a random moblin.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social