User Tag List

Results 1 to 8 of 8

Thread: Some Questions

  1. #1
    a.k.a. Zephlon Arphanosh Mega Link's Avatar
    Join Date
    May 2006
    Age
    31
    Posts
    371
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,675
    Level
    13
    vBActivity - Bars
    Lv. Percent
    73.91%

    Some Questions

    1. How do you get ffcs to move?
    2. How do you get ffcs to move when pressing the directional buttons?
    3. How do you make things happen when an ffc touches Link or another ffc?
    4. How do you make Link invisible?
    5. How do you force enemies to target another ffc?
    6. How do you draw text on a screen?
    7. How do you draw a 2x2 frame on a screen?
    8. How do you highlight and change the color of existing text?

  2. #2
    &&
    ZC Developer
    Joe123's Avatar
    Join Date
    Sep 2006
    Age
    33
    Posts
    3,061
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    7,308
    Level
    26
    vBActivity - Bars
    Lv. Percent
    9.46%

    Re: Some Questions

    Quote Originally Posted by Mega Link View Post
    1. How do you get ffcs to move?
    2. How do you get ffcs to move when pressing the directional buttons?
    3. How do you make things happen when an ffc touches Link or another ffc?
    4. How do you make Link invisible?
    5. How do you force enemies to target another ffc?
    6. How do you draw text on a screen?
    7. How do you draw a 2x2 frame on a screen?
    8. How do you highlight and change the color of existing text?
    Oooo, you're going to do it yourself?

    Very good ^_^

    Right.

    1. How do you get ffcs to move?
      To make ffcs move, what you do is set their Vx and Vy values (X and Y velocity).

      If you want to make the ffc you have the script applied to move, it has it's own pointer loaded up automatically, so you do it like this:
      Code:
      this->Vx = 1;
      this->Vy = 1;
      However, if you want to load a different ffc, and make that move (you might want to note this cause it could be important for later):
      Code:
       ffc ffcnamegoeshere = Screen->LoadFFC(whatever number the ffc is you're loading);
      Then you just reference the ffc like you did with 'this':
      Code:
      ffcnamegoeshere->Vx = 1;
      .

      An X velocity of '1' will make it more to the right at a rate of 1 pixel per frame.

    2. How do you get ffcs to move when pressing the directional buttons?
      Well, you do pretty much the same thing I just said, but you make it conditional to whether Link is pressing the button or not!

      Just a simple little 'if' command.
      Code:
      if(Link->InputA){
          //then do some velocity maniplation here
      }
      The 'Link->Input ?? ' command works as a boolean.

      It's true if Link is pressing the button, false if he's not.
    3. How do you make things happen when an ffc touches Link or another ffc?
      I'll come back to this one when it's not 1AM, it's more complex.
    4. How do you make Link invisible?
      Make an item with LTM that will move Link's tiles down to somewhere on the tilesheet that they're all transparent.
    5. How do you force enemies to target another ffc?
      Eh?
    6. How do you draw text on a screen?
      Very simple:
      Code:
      Screen->Message(message number goes here);
      You'd want:
      Messages Freeze All Action
      Messages Dissapear
      Quest rules checked, and you might want to wait a couple of frames after it if you then want to continue with the script.

    7. How do you draw a 2x2 frame on a screen?
      Well, in a number of ways.
      Either by putting a 2x2 FFC where you want the frame, or with Screen->Drawtile.
      I'll come back to those too.

    8. How do you highlight and change the color of existing text?
      With the text editor.
      Check the Wiki.

  3. #3
    a.k.a. Zephlon Arphanosh Mega Link's Avatar
    Join Date
    May 2006
    Age
    31
    Posts
    371
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,675
    Level
    13
    vBActivity - Bars
    Lv. Percent
    73.91%

    Re: Some Questions

    Quote Originally Posted by Joe123
    Oooo, you're going to do it yourself?

    Very good ^_^
    Only because no one will make it or even reply to the thread.:mad:
    Quote Originally Posted by Joe123
    How do you force enemies to target another ffc?
    Eh?
    What I meant was that, instead of shooting at Link, they'll shoot at the ffc that looks like Link while the real one is invisible.
    Quote Originally Posted by Joe123
    How do you draw text on a screen?
    Very simple:
    Code:
    Screen->Message(message number goes here);
    You'd want:
    Messages Freeze All Action
    Messages Dissapear
    Quest rules checked, and you might want to wait a couple of frames after it if you then want to continue with the script.
    Not what I wanted. I want it to write text at a certain position, and the text is defined by script.
    Quote Originally Posted by Joe123
    How do you highlight and change the color of existing text?
    With the text editor.
    Check the Wiki.
    Again, I want it done entirely by script.

  4. #4
    Wizrobe
    Join Date
    Dec 2006
    Age
    29
    Posts
    3,693
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    8,940
    Level
    28
    vBActivity - Bars
    Lv. Percent
    43.62%

    Re: Some Questions

    Quote Originally Posted by Mega Link View Post
    Only because no one will make it or even reply to the thread.:mad:

    What I meant was that, instead of shooting at Link, they'll shoot at the ffc that looks like Link while the real one is invisible.

    Not what I wanted. I want it to write text at a certain position, and the text is defined by script.

    Again, I want it done entirely by script.
    For the enemies targetting a fake Link, I don't think it's possible. Sorry.

    As for the text being written by script, I believe draw tile would work. Unfortunatly, I don't know how to use it, so you'll have to wait for Joe to help you on that one.
    Quote Originally Posted by rock_nog View Post
    Well of course eveything's closed for Easter - don't you know of the great Easter tradition of people barricading themselves up to protect themselves from the return of Zombie Christ?


  5. #5
    &&
    ZC Developer
    Joe123's Avatar
    Join Date
    Sep 2006
    Age
    33
    Posts
    3,061
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    7,308
    Level
    26
    vBActivity - Bars
    Lv. Percent
    9.46%

    Re: Some Questions

    Only because no one will make it or even reply to the thread.
    Well, I was going to reply to it, but only to say 'No, I don't want to use it in my quest', so I thought it probably wasn't worth getting your hopes up...

    Anyway.

    Yah, you'll have to script enemies for that one.

    Or just hide Link underneath the boat.
    Which is probably much simpler.

    Code:
     void DrawTile(int layer, int x, int y, int tile, int blockw, int blockh, int cset, float scale, int rx, int ry, int rangle, int flip, bool transparency, int opacity)
    
    Draws a block of tiles on the specified layer of the current screen, starting at (x,y), using the specified cset. Starting with the specified tile, this method copies a block of size blockh x blockw from the tile sheet to the screen. This method's behavior is undefined unless 1 <= blockh, blockw <= 20. The scaling and rotation parameters are reserved for the future, and not currently implemented. This method's behavior is undefined unless rx=ry=rangle=0 and scale=1. Flip specifies how the tiles should be flipped when drawn: 0: No flip 1: Vertical flip 2: Horizontal flip 3: Both (180 degree rotation) If transparency is true, the tiles' transparent regions will be respected. Opacity controls how transparent the solid portions of the tiles will be. Values other than 128 (solid) and 64 (translucent) are currently undefined.
    An example would be:
    Code:
    Screen->DrawTile(layer, Xcoord, Ycoord, Startingtile, Blockwidth, Blockheight, Cset, 1, 0, 0, 0, 0, true, 128);
    Make sure to capitalise the 'T' in 'Tile', otherwise it won't compile.

    How do you make things happen when an ffc touches Link or another ffc?
    To do this, you have to check distances between things.
    You draw a pseudo square (as in, you don't see it, but the script 'sees' it) around one of the objects, then check whether the other object is within that square.

    The easiest way to do this is to use the 'Abs' function.

    'Abs' (or 'absolute') takes a number, and returns only a positive value for it, so if the num ber is a negative number, it will turn it into a positive number.

    So what you'd do is:
    In an 'if' command, subtract Link's X coordinate from the ffc's X coordinate.
    This returns a value of distance, but it isn't very useful at the moment, due to the fact that it might be below 0.
    So you return the Abs value for it, then check if that is less than that distance you want to know between the two.
    Then repeat, for the Y coordinate.

    Like this:
    Code:
    if(Abs(Link->X - this->X) < 20) && Abs(Link->Y - this->Y < 20)){
        //do whatever
    )

  6. #6
    a.k.a. Zephlon Arphanosh Mega Link's Avatar
    Join Date
    May 2006
    Age
    31
    Posts
    371
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,675
    Level
    13
    vBActivity - Bars
    Lv. Percent
    73.91%

    Re: Some Questions

    Ok.

    Another question.

    What is the proper way to give Link the compass for a specific Dmap?

  7. #7
    The Time-Loop Continues ZC Developer
    Gleeok's Avatar
    Join Date
    Apr 2007
    Posts
    4,826
    Mentioned
    259 Post(s)
    Tagged
    10 Thread(s)
    vBActivity - Stats
    Points
    12,963
    Level
    33
    vBActivity - Bars
    Lv. Percent
    26.72%

    Re: Some Questions

    You could check it in initial data...or Link->Item[?]=true;


    Again, I want it done entirely by script.
    I don't think that is possible without some acrobatics. You could always use combos or DrawTile and set them up yourself in the tiles page.




    How do you get ffcs to move?
    this->Vx,this->X,thisAx: velocity, directly change, and accell.

    How do you get ffcs to move when pressing the directional buttons?

    if(Link->InputLeft){//do stuff

    How do you make things happen when an ffc touches Link or another ffc? -again Abs works well.

    How do you force enemies to target another ffc? You script custom enemies.

    How do you draw a 2x2 frame on a screen? -DrawTile, or Large ffc's
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

  8. #8
    a.k.a. Zephlon Arphanosh Mega Link's Avatar
    Join Date
    May 2006
    Age
    31
    Posts
    371
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,675
    Level
    13
    vBActivity - Bars
    Lv. Percent
    73.91%

    Re: Some Questions

    Don't you have to make a loop in order for this code to work?
    Code:
     if(Link->InputA){
        //then do some velocity maniplation here
    }

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