User Tag List

Results 1 to 3 of 3

Thread: Arg Assignment Iidea.

  1. #1
    Admiral Zim's Avatar
    Join Date
    Oct 2012
    Posts
    388
    Mentioned
    9 Post(s)
    Tagged
    2 Thread(s)
    vBActivity - Stats
    Points
    1,703
    Level
    13
    vBActivity - Bars
    Lv. Percent
    84.24%

    Arg Assignment Iidea.

    The recent addition of being able to assign a different script to the ffc is really useful and everything. It made me think of something else (actually I thought of this years ago but didn't bother writing you about it yet) when I went to implement that into some screens of mine:
    Would you developers, if you have the time, make a pointer-assignable argument changer for the ffcs? It'd be for changing messages, item availability at shops, the graphics, etc..
    Reassigning a new script to the same ffc would make me have to write out a new script for every time the events flags in my game trigger an FFC NPC to say something different, give a new item, etc.. which would be fine except for that I like to use the FFCs for graphical reasons to make seamless looking transitions between the terrains and things like that, so it would be nice to have as many of them available as possible. FFC->Script solves that problem, however, like I stated, that method makes it so I have to write a new message, graphic, etc. script for each change in the FFC's behavior. A function that could reassign the FFC's args like
    Code:
    void ArgChange(int a,int b,int c,int D,int x)
    {
    if(Game->GetCurDMap()==a&&Game->GetCurScreen()==b) //Function only activates on screen a of DMap b
     {
     ffc FFC=Screen->LoadFFC(c);
     if(D==0){FFC->D0=x;} // <---This line here is the one not implementable yet.
     if(D==1){FFC->D1=x;} 
     if(D==2){FFC->D2=x;}
     if(D==3){FFC->D3=x;}
     if(D==4){FFC->D4=x;} 
     if(D==5){FFC->D5=x;} 
     if(D==6){FFC->D6=x;}
     if(D==7){FFC->D7=x;} 
     if(D==8){FFC->A1=x;}
     if(D==9){FFC->A2=x;}  
     }
    }//With this script someone could change the arguments of the given ffc of the given screen on the given dmap triggered by any other game event when it occurs by writing in the ArgChange 
    //function.  That would be so sweet!
    I understand that what I'm asking can be done by assigning a global variable to the script and changing it via another script when the event in question occurs, however, due to the global variables limit, and the massive amount of content I would like to have in my quest eventually, it would be very desirable to be able to change that with a function instead of having to use a global variable at all.
    Thanks again guys 'n gals!
    Last edited by Zim; 01-04-2013 at 03:07 PM. Reason: I left a few details of the idea out the first time.

  2. #2
    Is this the end?
    ZC Developer
    Saffith's Avatar
    Join Date
    Jan 2001
    Age
    41
    Posts
    3,389
    Mentioned
    178 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,434
    Level
    24
    vBActivity - Bars
    Lv. Percent
    70.25%
    That's ffc->InitD[].

  3. #3
    Admiral Zim's Avatar
    Join Date
    Oct 2012
    Posts
    388
    Mentioned
    9 Post(s)
    Tagged
    2 Thread(s)
    vBActivity - Stats
    Points
    1,703
    Level
    13
    vBActivity - Bars
    Lv. Percent
    84.24%
    Quote Originally Posted by Saffith View Post
    That's ffc->InitD[].
    Oh yeah! I remember seeing that before. Sorry I bug you about things that slip my mind sometimes Saffith, you're great for helping me though. That last thing you reminded me about for(blah blah, x+=16) is something I had already thought of too and forgot about.
    Code:
    void ArgChange(int a,int b,int c,int D,int x)// (Dmap, Screen, FFC, Argument, What to change the argument to)
    {
    if(Game->GetCurDMap()==a&&Game->GetCurScreen()==b) //Function only activates on screen a of DMap b
     {
     ffc FFC=Screen->LoadFFC(c);
    // Changes Argument (D) of ffc (c) on screen (b) of DMAP (a) to x
     if(D==0){FFC->InitD[0]=x;} 
     if(D==1){FFC->InitD[1]=x;} 
     if(D==2){FFC->InitD[2]=x;}
     if(D==3){FFC->InitD[3]=x;}
     if(D==4){FFC->InitD[4]=x;} 
     if(D==5){FFC->InitD[5]=x;} 
     if(D==6){FFC->InitD[6]=x;}
     if(D==7){FFC->InitD[7]=x;} 
     if(D==8){FFC->InitD[8]=x;}
     if(D==9){FFC->InitD[9]=x;}
     }
    }//With this script someone could change the arguments of the given ffc of the given screen on the given dmap triggered by any other game event when it occurs by writing in the ArgChange 
    //function.
    Well alrighty then. Maybe this post should go into the Scripting Database then instead now that it's done. Thanks!
    Last edited by Zim; 01-04-2013 at 09:37 PM.

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