User Tag List

Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 29

Thread: Permanent pseudo-solidity?

  1. #1
    Ultimate Prankster Lucario QDB Manager
    Just registered
    Nimono's Avatar
    Join Date
    Nov 2005
    Location
    Static Void Kingdom
    Age
    32
    Posts
    1,963
    Mentioned
    5 Post(s)
    Tagged
    2 Thread(s)
    vBActivity - Stats
    Points
    6,276
    Level
    24
    vBActivity - Bars
    Lv. Percent
    43.92%

    Permanent pseudo-solidity?

    I tried. I failed. How on earth do I make an FFC pseudo-solid? In my Cane of Somaria script, I give FFC 32 the pointer "SomariaBlock". Throughout the rest of the script, I modify that FFC (seeing as that's what the REAL Cane of Somaria does, anyways). The problem is, C-Dawg told me to grab some piece of code from his multiblock trigger script and put it in my script to fake solidity. I kept trying to get it right, but he kept saying it wouldn't work. He then suggested I make the combo under the block solid instead. First things first: How would I do that last suggestion he made? Second, how exactly would I fake solidity on the FFC itself and still be able to push it?

    You know, now that I've given it more thought, the "Make the combo itself solid instead of the FFC" is better, seeing as I can change the combo type, change the walkability, and give it a flag. Only problem would be: How would I make the FFC move with the combo if it was the combo I was pushing instead of the FFC?

  2. #2
    Lynel Revfan9's Avatar
    Join Date
    Jun 2005
    Location
    In front of a screen. I never leave.
    Age
    31
    Posts
    1,160
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    3,390
    Level
    18
    vBActivity - Bars
    Lv. Percent
    71.05%

    Re: Permanent pseudo-solidity?

    ...In Zasm, I know that you can set COMBOSD to 4 for the combo directly underneath of the FFC to fake solidity, but I don't know how to do that in Zscript. Although I imagine it would be possible to draw a combo in place of the "FFC", then destroying the combo when it is done, although combo drawing functions are broken in the latest betas.

  3. #3
    Ultimate Prankster Lucario QDB Manager
    Just registered
    Nimono's Avatar
    Join Date
    Nov 2005
    Location
    Static Void Kingdom
    Age
    32
    Posts
    1,963
    Mentioned
    5 Post(s)
    Tagged
    2 Thread(s)
    vBActivity - Stats
    Points
    6,276
    Level
    24
    vBActivity - Bars
    Lv. Percent
    43.92%

    Re: Permanent pseudo-solidity?

    I believe the ZScript equivalent is "int ComboS", but... I have no idea how I'm supposed to call a COMBO to edit on the screen. This is exactly what it says for int ComboS in the documentation:

    Code:
    int ComboS[]
     * The walkability mask of the ith combo on the screen, where i is the
     * index used to access this array. Combos are counted left to right, top
     * to bottom. The least signficant bit is true if the top-left of the tile
     * is walkable, the second-least signficant bit is true if the top-right
     * of the tile is is walkable, and so on for the following two bits.
    The four bits are obviously in binary (which would be 1111, or 15 in decimal, or F in hexadecimal), but how do I know exactly which combo I call from the screen? And how would I even call a specific combo? All I can see that I could put would be something like "Screen->ComboS(15)", but where's the part that tells exactly which combo to call?

  4. #4
    Keese
    Join Date
    Aug 2005
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    831
    Level
    10
    vBActivity - Bars
    Lv. Percent
    8.52%

    Re: Permanent pseudo-solidity?

    My guess;

    Screen->ComboS [] (combonumber or numbers) = 15;

  5. #5
    Ultimate Prankster Lucario QDB Manager
    Just registered
    Nimono's Avatar
    Join Date
    Nov 2005
    Location
    Static Void Kingdom
    Age
    32
    Posts
    1,963
    Mentioned
    5 Post(s)
    Tagged
    2 Thread(s)
    vBActivity - Stats
    Points
    6,276
    Level
    24
    vBActivity - Bars
    Lv. Percent
    43.92%

    Re: Permanent pseudo-solidity?

    Quote Originally Posted by Fire Wizzrobe View Post
    My guess;

    Screen->ComboS [] (combonumber or numbers) = 15;
    O_o I wish I could get a scriptmaster to help with this... Ah well. See, the problem is, this won't work unless I can make the FFC move with the combo AND have the combo turn back to its previous state when the FFC is no longer on it. THAT is the problem, and it's why I want the FFC solid instead of the combo under it.

  6. #6
    Keese
    Join Date
    Aug 2005
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    831
    Level
    10
    vBActivity - Bars
    Lv. Percent
    8.52%

    Re: Permanent pseudo-solidity?

    Ahh.. I think I got it now. The indexes... are well, the combos on screen. How could I miss that!? Discard the second set of parentheses.

  7. #7
    Ultimate Prankster Lucario QDB Manager
    Just registered
    Nimono's Avatar
    Join Date
    Nov 2005
    Location
    Static Void Kingdom
    Age
    32
    Posts
    1,963
    Mentioned
    5 Post(s)
    Tagged
    2 Thread(s)
    vBActivity - Stats
    Points
    6,276
    Level
    24
    vBActivity - Bars
    Lv. Percent
    43.92%

    Re: Permanent pseudo-solidity?

    Quote Originally Posted by Fire Wizzrobe View Post
    Ahh.. I think I got it now. The indexes... are well, the combos on screen. How could I miss that!? Discard the second set of parentheses.
    Okay, since you *seem* to understand this, how about helping me get this solidity code working? I want to get this script done ASAP, but I can't if I can't push it or anything.

  8. #8
    Keese
    Join Date
    Aug 2005
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    831
    Level
    10
    vBActivity - Bars
    Lv. Percent
    8.52%

    Re: Permanent pseudo-solidity?

    I'm trying to figure out the formula to pinpoint a combo based on the block's X and Y positions right now...

    Edit:
    Never mind! I got it from std.zh! Script in a second!

    int ComboAt(int x, int y) {
    return (y & 240)+(x>>4);
    }
    Edit 2:

    Code:
    #include std.zh //Place at top
    
    (The Block)->ComboAt = ffcpos
    Screen->ComboS [ffcpos] = 15;

  9. #9
    Ultimate Prankster Lucario QDB Manager
    Just registered
    Nimono's Avatar
    Join Date
    Nov 2005
    Location
    Static Void Kingdom
    Age
    32
    Posts
    1,963
    Mentioned
    5 Post(s)
    Tagged
    2 Thread(s)
    vBActivity - Stats
    Points
    6,276
    Level
    24
    vBActivity - Bars
    Lv. Percent
    43.92%

    Re: Permanent pseudo-solidity?

    Quote Originally Posted by Fire Wizzrobe View Post
    I'm trying to figure out the formula to pinpoint a combo based on the block's X and Y positions right now...

    Edit:
    Never mind! I got it from std.zh! Script in a second!

    int ComboAt(int x, int y) {
    return (y & 240)+(x>>4);
    }
    Edit 2:

    Code:
    #include std.zh //Place at top
    
    (The Block)->ComboAt = ffcpos
    Screen->ComboS [ffcpos] = 15;
    Did you test the code? Also, which do I use? Plus, do I put "#include std.zh" at the point where I'd normally use the code import "std.zh"? Or should I just use import "std.zh"?

    Edit: It doesn't work. When I input it like that, it says that ffcpos is undeclared. When I change it so it IS declared... It says ComboAt isn't a valid pointer. I bet it would instead work like this:

    Code:
    int ffcpos = Screen->ComboAt (FFC_Pointer->X, FFC_Pointer>Y)
    ...Well, I guess not.

    ...Great. It's defunct now. It keeps saying that the comma shouldn't be there. But if I took it out, it'd be invalid.

  10. #10
    Keese
    Join Date
    Aug 2005
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    831
    Level
    10
    vBActivity - Bars
    Lv. Percent
    8.52%

    Re: Permanent pseudo-solidity?

    I'm sorry. I've only been doing C++ for 2 1/2 months and I suck.

    Code:
    //Declare ffcy, ffcx and position as int variables first (duh)
    //Header file is not needed
    SomariaBlock->Y = ffcy;
    SomariaBlock->X = ffcx;
    position = (ffcy & 240)+(ffcx>>4)
    Screen->ComboS [position] = 15;

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