User Tag List

Results 1 to 6 of 6

Thread: Simple Scripts

  1. #1
    Octorok Master_of_Power's Avatar
    Join Date
    May 2001
    Age
    35
    Posts
    496
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    2,196
    Level
    15
    vBActivity - Bars
    Lv. Percent
    47.25%

    Simple Scripts

    One that when you press a button on an FCC and you get an item or items.

    A shop script for more than 3 items(press A on the FCC and you buy the item)
    - Make tell me how to make it check if you have a certain item as before you can buy it

    A script that when you press the A button on it, you warp to a different location

    As I don't currently have a clue how to script yet(despite I'm learning a little at a time) I'd really like these scripts.
    Keeping something big a secret, in case it doesn't work out I can understand.
    But he deliberatly drops little hints just to drive us mad.

  2. #2
    Wizrobe C-Dawg's Avatar
    Join Date
    Jan 2002
    Posts
    4,205
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    6,612
    Level
    24
    vBActivity - Bars
    Lv. Percent
    99.98%

    Re: Simple Scripts

    Okie dokie. I've made the script create an item at Link's location, rather than just GIVING him the item, because that way you can use screen flags to have Link hold it up if you like.

    Code:
    // ================================
    // pushA_getitem = This script will check the
    // player's location when they push the A button.
    // if the A button is pressed while the player
    // is within 16 pixels of the FFC, the game will
    // create an item at Link's location.  The FFC will
    // only do this if Link has a specified precursor item.
    // The script will only trigger once, until Link exits 
    // and re-enters the screen.
    // D0 = The item to be created.
    // D1 = An item necessary to get the new one.
    //        Set to zero if you don't want there to be
    //        any precursor item.
    // ================================
    
    ffc script pushA_getitem{
    
       void run( int item, int pre_item ){
    
          int wastriggered = 0;      // whether or not the script has created an item yet.
    
          while(true){
             if ( (Link->InputA) && ( (Link->Item[pre_item]) || (pre_item == 0) ) && (Link->X < this->X+16) && (Link->X > this->X-1) && (Link->Y < this->Y+16) && (Link->Y > this->Y-1) && (wastriggered == 0)){
    
                 item new_item = Screen->CreateItem(item);
                 new_item->X = Link->X;
                 new_item->Y = Link->Y;
             } // end of if
    
             Waitframe();
          }
      
       } // end of void run
    
    } // end of ffc script
    Havn't tried complining it, but that should work.

  3. #3
    Octorok Master_of_Power's Avatar
    Join Date
    May 2001
    Age
    35
    Posts
    496
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    2,196
    Level
    15
    vBActivity - Bars
    Lv. Percent
    47.25%

    Re: Simple Scripts

    Quick edit:

    Code:
    // ================================
    // pushA_getitem = This script will check the
    // player's location when they push the A button.
    // if the A button is pressed while the player
    // is within 16 pixels of the FFC, the game will
    // create an item at Link's location.  The FFC will
    // only do this if Link has a specified precursor item.
    // The script will only trigger once, until Link exits 
    // and re-enters the screen.
    // D0 = The item to be created.
    // D1 = An item necessary to get the new one.
    //        Set to zero if you don't want there to be
    //        any precursor item.
    // ================================
    
    ffc script pushA_getitem{
    
       void run( int sc_item, int pre_item ){
    
          int wastriggered = 0;      // whether or not the script has created an item yet.
    
          while(true){
             if ( (Link->InputA) && ( (Link->Item[pre_item]) || (pre_item == 0) ) && (Link->X < this->X+16) && (Link->X > this->X-1) && (Link->Y < this->Y+16) && (Link->Y > this->Y-1) && (wastriggered == 0)){
    
                 item new_item = Screen->CreateItem(sc_item);
                 new_item->X = Link->X;
                 new_item->Y = Link->Y;
                 wastriggered = 1;
             } // end of if
    
             Waitframe();
          }
      
       } // end of void run
    
    } // end of ffc script
    Oh and it doesn't let you hold the item up anyway =\
    Keeping something big a secret, in case it doesn't work out I can understand.
    But he deliberatly drops little hints just to drive us mad.

  4. #4
    Wizrobe C-Dawg's Avatar
    Join Date
    Jan 2002
    Posts
    4,205
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    6,612
    Level
    24
    vBActivity - Bars
    Lv. Percent
    99.98%

    Re: Simple Scripts

    It should, I would think, if the "hold up item" flag is checked. Does it work for you, though?

  5. #5
    Octorok Master_of_Power's Avatar
    Join Date
    May 2001
    Age
    35
    Posts
    496
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    2,196
    Level
    15
    vBActivity - Bars
    Lv. Percent
    47.25%

    Re: Simple Scripts

    nope

    I have the hold item up screen flag checked and I don't hold the item up.
    Keeping something big a secret, in case it doesn't work out I can understand.
    But he deliberatly drops little hints just to drive us mad.

  6. #6
    Wizrobe C-Dawg's Avatar
    Join Date
    Jan 2002
    Posts
    4,205
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    6,612
    Level
    24
    vBActivity - Bars
    Lv. Percent
    99.98%

    Re: Simple Scripts

    Alright, sounds like it works otherwise though. One satisfied customer.

Thread Information

Users Browsing this Thread

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

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