User Tag List

Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 11 to 20 of 29

Thread: Permanent pseudo-solidity?

  1. #11
    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.91%

    Re: Permanent pseudo-solidity?

    Quote Originally Posted by Fire Wizzrobe View Post
    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;
    Oh please. I've only been doing it for THREE DAYS. I'll try that snippet of code.

  2. #12
    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.47%

    Re: Permanent pseudo-solidity?

    I didn't mean to offend you, if I did.

  3. #13
    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.91%

    Re: Permanent pseudo-solidity?

    Quote Originally Posted by Fire Wizzrobe View Post
    I didn't mean to offend you, if I did.
    No, I was making the point that you've been doing it longer than I have.

    Um, by the way, if this doesn't work, and you work on the code some more, will you please test it before you let me have it? I have the Block itself set up as another script so the solidity code doesn't conflict with that of the Cane itself.

    Edit: DARN IT!!! I was SOOOOO close to getting the solidity working! But if I put the solidity script in the item script part, it prevents you from moving AT ALL when you use the cane! Oh, by the way, would you mind explaining to me why this is in there:

    Code:
    position = (ffcy & 240)+(ffcx>>4)
    What good is that going to do? And PLEASE don't respond with "It was in std.zh, so I put it in there". That's just wrong, seeing as that thing was just an example and probably didn't have the same end result I/we want.

  4. #14
    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.47%

    Re: Permanent pseudo-solidity?

    Pinpointing the combo. That was the formula I was talking about, and it is not just an example. May I see the script?

  5. #15
    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.91%

    Re: Permanent pseudo-solidity?

    Okay. I'll only give you version 1 (the one that's just an item script and no FFC script) since version 2 (with both an item and FFC script) doesn't work...

    Code:
    // Cane of Somaria- Changes certain attributes of an FFC on the
    // current screen "Player" is on. It modifies the combo used,
    // combo type, flags, etc. In the end, it looks like a block.
    // This item will also change the location of the FFC so it
    // always "spawns" 2 tiles away from Link in the direction he
    // is currently facing. Becuase of limited knowledge, this
    // script currently does not prevent you from walking onto the
    // block. Any mention of "SomariaBlock" in the script refers to
    // the Freeform Combo. Have fun.
    // Note: Due to limitations (and the SomariaBlock script (see below
    // this script)), only FFC 1 can be used as the Somaria Block
    // until the FFC script bug is destroyed.
    
    import "std.zh"
    item script CaneSomaria
    {
    	void run()
    	{
    		ffc SomariaBlock = Screen->LoadFFC(1);
    		if(Link->Dir == 0)
    		{
    			SomariaBlock->X = Link->X;
    			SomariaBlock->Y = Link->Y - 32;
    		}
    		else if(Link->Dir == 1)
    		{
    			SomariaBlock->X = Link->X;
    			SomariaBlock->Y = Link->Y + 32;
    		}
    		else if(Link->Dir == 2)
    		{
    			SomariaBlock->X = Link->X - 32;
    			SomariaBlock->Y = Link->Y;
    		}
    		else if(Link->Dir == 3)
    		{
    			SomariaBlock->X = Link->X + 32;
    			SomariaBlock->Y = Link->Y;
    		}
    		float remainder = SomariaBlock->X % 16;
    		if ( remainder <= 8 )
    		{
    			SomariaBlock->X = SomariaBlock->X - remainder;
    		}
    		else
    		{ 
    			SomariaBlock->X = SomariaBlock->X + 16 - remainder;
    		}
    		float remainderY = SomariaBlock->Y % 16;
    		if ( remainderY <= 8 )
    		{
    			SomariaBlock->Y = SomariaBlock->Y - remainderY;
    		}
    		else
    		{ 
    			SomariaBlock->Y = SomariaBlock->Y + 16 - remainderY;
    		}
    		SomariaBlock->Data = 2123;
    		SomariaBlock->CSet = 10;
    		int ffcy = SomariaBlock->Y;
    		int ffcx = SomariaBlock->X;
    		int position = (ffcy & 240)+(ffcx>>4);
    		Screen->ComboS [position] = 15;
    	}
    }
    Notes:
    -I had to change float to int at the last lines because the compiler expected a semicolon after float.
    -I also had to rearrange everything so I could declare variables.
    -I WANT TO KNOW WHAT THE HECK THAT LINE I MENTIONED BEFORE DOES.

    Edit: By the way, if I don't post very often, it's because I'm watching Supernanny. Yes, I like that show. It proves exactly how chaotic this world really is, and it all begins with the children and irresponsible parents.... Sigh...

  6. #16
    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.47%

    Re: Permanent pseudo-solidity?

    Please show me the one that doesn't works.

    The line preforms bitwise opperation AND with the Y coordinate and >> shifts the bits in the X coordinate by 4 places, otherwise dividing it by 16.

    So, if X was 16, it would equal one. AND returns the same values that goes in for multiples of 16. If Y is 0, it will be 0, and if it is 16, it will be 16 and so forth.

    The combo 1 tile right of the left hand corner would be labeled as 1. (16,0) The combo below it would be labeled as 17.(16,16) When the values of X and Y are added, it tells ComboS[] looks for these combos in this grid-like pattern.

  7. #17
    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.91%

    Re: Permanent pseudo-solidity?

    Okay.

    Code:
    // Cane of Somaria- Changes certain attributes of an FFC on the
    // current screen "Player" is on. It modifies the combo used,
    // combo type, flags, etc. In the end, it looks like a block.
    // This item will also change the location of the FFC so it
    // always "spawns" 2 tiles away from Link in the direction he
    // is currently facing. Becuase of limited knowledge, this
    // script currently does not prevent you from walking onto the
    // block. Any mention of "SomariaBlock" in the script refers to
    // the Freeform Combo. Have fun.
    // Note: Due to limitations (and the SomariaBlock script (see below
    // this script)), only FFC 1 can be used as the Somaria Block
    // until the FFC script bug is destroyed.
    
    import "std.zh"
    item script CaneSomaria
    {
    	void run()
    	{
    		ffc SomariaBlock = Screen->LoadFFC(1);
    		if(Link->Dir == 0)
    		{
    			SomariaBlock->X = Link->X;
    			SomariaBlock->Y = Link->Y - 32;
    		}
    		else if(Link->Dir == 1)
    		{
    			SomariaBlock->X = Link->X;
    			SomariaBlock->Y = Link->Y + 32;
    		}
    		else if(Link->Dir == 2)
    		{
    			SomariaBlock->X = Link->X - 32;
    			SomariaBlock->Y = Link->Y;
    		}
    		else if(Link->Dir == 3)
    		{
    			SomariaBlock->X = Link->X + 32;
    			SomariaBlock->Y = Link->Y;
    		}
    		float remainder = SomariaBlock->X % 16;
    		if ( remainder <= 8 )
    		{
    			SomariaBlock->X = SomariaBlock->X - remainder;
    		}
    		else
    		{ 
    			SomariaBlock->X = SomariaBlock->X + 16 - remainder;
    		}
    		float remainderY = SomariaBlock->Y % 16;
    		if ( remainderY <= 8 )
    		{
    			SomariaBlock->Y = SomariaBlock->Y - remainderY;
    		}
    		else
    		{ 
    			SomariaBlock->Y = SomariaBlock->Y + 16 - remainderY;
    		}
    		SomariaBlock->Data = 2123;
    		SomariaBlock->CSet = 10;
    	}
    }
    
    
    // SomariaBlock- Script for the solidity of the block "created" by the Cane of Somaria.
    
    ffc script SomariaBlock
    {
    	void run()
    	{
    		ffc SomariaBlock = Screen->LoadFFC(1);
    		float ffcy = SomariaBlock->Y;
    		float ffcx = SomariaBlock->X;
    		float position = (ffcy & 240)+(ffcx>>4);
    		Screen->ComboS [position] = 15;
    		void waitframe;
    	}
    }
    The code is attached to the FFC script here, but... Either the code isn't working, on the script gets turned off because I'm modifying it through the item script. Is there a command to modify the script number a FFC uses?

  8. #18
    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.47%

    Re: Permanent pseudo-solidity?

    Screen->LoadFFC(2);

    It's the number between the brackets.

  9. #19
    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.91%

    Re: Permanent pseudo-solidity?

    Quote Originally Posted by Fire Wizzrobe View Post
    Screen->LoadFFC(2);

    It's the number between the brackets.
    ??? What do you mean? Did you even test to see if it works? Are you saying I replace Screen->LoadFFC(1) with Screen->LoadFFC(2)?

  10. #20
    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.47%

    Re: Permanent pseudo-solidity?

    Just combine the two scripts. The number in between the bracket refers to the number of the FFC that the command loads.

    It doesn't directly change the script number. I read your question too fast.

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