User Tag List

Page 4 of 4 FirstFirst ... 2 3 4
Results 31 to 37 of 37

Thread: Cane Of Somaria Is Here At Last

  1. #31
    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,275
    Level
    24
    vBActivity - Bars
    Lv. Percent
    43.79%

    Re: Cane Of Somaria Is Here At Last

    Quote Originally Posted by Joe123 View Post
    Can't you do this with ComboAt?
    No. Unless you only want to check the position right in front of Link. I have to check every. single. combo for the block. Here's my plan:

    1: Check for the block
    2: If found, set 4 variables to the combos on all four spots around it
    3: Set its current location
    4: If moved, place the reset combo where it once was, set new location, and set the reset combo to the combo it overwrote

    Yeeeeah. But since ComboAt and that stuff _L_'s Switch Gate script uses to check for the blocks use one single number... I can't change the x or y positions to work. Thus, no script. D: If anyone's got an idea how to do "for(int i, blah blah blah)" so it keeps the X and Y seperate until ready to be used to look for the block, let me know IMMEDIATELY. I can't perfect the script without it.

  2. #32
    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,958
    Level
    33
    vBActivity - Bars
    Lv. Percent
    26.12%

    Re: Cane Of Somaria Is Here At Last

    Howabout using the item script in cunjunction with a ffc script. FFC's arent solid, but I beleive you can fein solidity by changing the combo at the ffc x,y location to solid, push type. This would also give the cane an ffc animation, sfx, etc, as well. As for the undercombos, I really don't know if your able to fix that, but you're a much better scripter than I am. You could add a ffc->Data check, variable, or something similar for pressing B again to shoot projectiles in 4 directions also. Just throwing out idea's. It's a cool script.
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

  3. #33
    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,275
    Level
    24
    vBActivity - Bars
    Lv. Percent
    43.79%

    Re: Cane Of Somaria Is Here At Last

    Quote Originally Posted by Gleeok View Post
    Howabout using the item script in cunjunction with a ffc script. FFC's arent solid, but I beleive you can fein solidity by changing the combo at the ffc x,y location to solid, push type. This would also give the cane an ffc animation, sfx, etc, as well. As for the undercombos, I really don't know if your able to fix that, but you're a much better scripter than I am. You could add a ffc->Data check, variable, or something similar for pressing B again to shoot projectiles in 4 directions also. Just throwing out idea's. It's a cool script.
    I'm not using JUST an item script anymore. I know you don't know all that I'm doing, but it's not helping trying to assume that I'm trying to keep it nothing but an item script, now is it? It'll be Item + Global script. Not FFC, since some of you might be using so many FFCs on a single screen, it wouldn't be right to use an FFC script for this. Plus, you'd have to set it for every screen you could possibly start on. Which would you rather do? Put an FFC script on every screen you can start on so the Cane can be used? Or just load the item and global scripts, and just set the item script to an item, and be done with it? Also, FFC = No, because I could never get them to be solid without making the whole SCREEN solid. (And worse yet, THEY CAN'T WORK WITH ANY FLAGS.)

  4. #34
    Wizrobe
    Join Date
    Nov 2002
    Posts
    2,819
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    8,461
    Level
    27
    vBActivity - Bars
    Lv. Percent
    77.84%

    Re: Cane Of Somaria Is Here At Last

    Hey is it possible to modify this script so that you can only do it once per screen and you can't delete the block once you create it, however, it auomtatically disappears when you leave the screen & comes back?
    My Zquest Tutorial
    tutorial document

    Working on a quest, I swear i'll finally finish one, one of these days!

    Status:
    --Overworld: 60% done
    --Dungeons: 0% done
    --Misc: 0% done

  5. #35
    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,275
    Level
    24
    vBActivity - Bars
    Lv. Percent
    43.79%

    Re: Cane Of Somaria Is Here At Last

    Quote Originally Posted by idontknow View Post
    Hey is it possible to modify this script so that you can only do it once per screen and you can't delete the block once you create it, however, it auomtatically disappears when you leave the screen & comes back?
    Yup.

    Code:
    // Cane of Somaria (OoA version)- When used, this item will create a block in front of Link if the block in front of him isn't solid. 
    // If the combo is solid, this script does nothing.
    // Variables:
    // Cmb- The combo that the Cane switches a screen's combo to. Simply enter the combo number seen in the combo editor!
    // CmbC- The CSet of the new combo. Only use 0-11 for best results.
    // CmbS- Secret Flag of the new combo.
    // SomariaCheck- A special variable used only for checking if a Somaria Block is already on-screen. Creating a Block
    // sets this Variable to 1. Destroying one sets it to 0. This variable is checked only by one function. DO NOT MESS WITH IT!!!!
    // CmbR- The combo the Block resets to when SomariaCheck is set to 1 when you use this item.
    // CmbRC- CSet the of the reset combo.
    // CmbRS- Secret Flag of the reset combo.
    
    
    int SomariaBlockX = 0;
    int SomariaBlockY = 0;
    int SomariaCheck = 0;
    int SomariaBlockPosition = 0;
    int CurScreen = 0;
    int LastScreen = 0;
    int CurMap = 0;
    int LastMap = 0;
    const int Cmb = A;
    const int CmbC = B;
    const int CmbS = C;
    const int NoBlock = D;
    
    import "std.zh"
    item script CaneSomariaOoA
    {
    	void run()
    	{
    		CurScreen = Game->GetCurScreen();
    		CurMap = Game->GetCurMap();
    		if (CurScreen != LastScreen)
    		{
    			SomariaCheck = 0;
    		}
    		else if (CurMap != LastMap)
    		{
    			SomariaCheck = 0;
    		}
    		if (SomariaCheck == 1)
    		{
    			Game->PlaySound[NoBlock];
    		}
    		if (Link->Dir == 0)
    		{
    			int BlockCheckY = Link->Y - 32;
    			int BlockCheckX = Link->X;
    			float BlockRmndrX = BlockCheckX % 16;
    			if (BlockRmndrX <= 8)
    			{
    				BlockCheckX = BlockCheckX - BlockRmndrX;
    			}
    			else
    			{
    				BlockCheckX = BlockCheckX + 16 - BlockRmndrX;
    			}
    			float BlockRmndrY = BlockCheckY % 16;
    			if (BlockRmndrY <= 8)
    			{
    				BlockCheckY = BlockCheckY - BlockRmndrY;
    			}
    			else
    			{ 
    				BlockCheckY = BlockCheckY + 16 - BlockRmndrY;
    			}
    			int BlockPosition = (BlockCheckY & 240)+(BlockCheckX>>4);
    			if (Screen->ComboS [BlockPosition] == 0)
    			{
    				SomariaBlockY = Link->Y - 32;
    				SomariaBlockX = Link->X;
    				float remainder = SomariaBlockX % 16;
    				if (remainder <= 8)
    				{
    					SomariaBlockX = SomariaBlockX - remainder;
    				}
    				else
    				{ 
    					SomariaBlockX = SomariaBlockX + 16 - remainder;
    				}
    				float remainderY = SomariaBlockY % 16;
    				if (remainderY <= 8)
    				{
    					SomariaBlockY = SomariaBlockY - remainderY;
    				}
    				else
    				{
    					SomariaBlockY = SomariaBlockY + 16 - remainderY;
    				}
    				int SomariaBlockPosition = (SomariaBlockY & 240)+(SomariaBlockX>>4);
    				Screen->ComboD [SomariaBlockPosition] = Cmb;
    				Screen->ComboC [SomariaBlockPosition] = CmbC;
    				Screen->ComboF [SomariaBlockPosition] = CmbS;
    			}
    		}
    		else if (Link->Dir == 1)
    		{
    			int BlockCheckY = Link->Y + 32;
    			int BlockCheckX = Link->X;
    			float BlockRmndrX = BlockCheckX % 16;
    			if (BlockRmndrX <= 8)
    			{
    				BlockCheckX = BlockCheckX - BlockRmndrX;
    			}
    			else
    			{
    				BlockCheckX = BlockCheckX + 16 - BlockRmndrX;
    			}
    			float BlockRmndrY = BlockCheckY % 16;
    			if (BlockRmndrY <= 8)
    			{
    				BlockCheckY = BlockCheckY - BlockRmndrY;
    			}
    			else
    			{ 
    				BlockCheckY = BlockCheckY + 16 - BlockRmndrY;
    			}
    			int BlockPosition = (BlockCheckY & 240)+(BlockCheckX>>4);
    			if (Screen->ComboS [BlockPosition] == 0)
    			{
    				SomariaBlockY = Link->Y + 32;
    				SomariaBlockX = Link->X;
    				float remainder = SomariaBlockX % 16;
    				if (remainder <= 8)
    				{
    					SomariaBlockX = SomariaBlockX - remainder;
    				}
    				else
    				{ 
    					SomariaBlockX = SomariaBlockX + 16 - remainder;
    				}
    				float remainderY = SomariaBlockY % 16;
    				if (remainderY <= 8)
    				{
    					SomariaBlockY = SomariaBlockY - remainderY;
    				}
    				else
    				{
    					SomariaBlockY = SomariaBlockY + 16 - remainderY;
    				}
    				int SomariaBlockPosition = (SomariaBlockY & 240)+(SomariaBlockX>>4);
    				Screen->ComboD [SomariaBlockPosition] = Cmb;
    				Screen->ComboC [SomariaBlockPosition] = CmbC;
    				Screen->ComboF [SomariaBlockPosition] = CmbS;
    			}
    
    		}
    		else if (Link->Dir == 2)
    		{
    			int BlockCheckY = Link->Y;
    			int BlockCheckX = Link->X - 32;
    			float BlockRmndrX = BlockCheckX % 16;
    			if (BlockRmndrX <= 8)
    			{
    				BlockCheckX = BlockCheckX - BlockRmndrX;
    			}
    			else
    			{
    				BlockCheckX = BlockCheckX + 16 - BlockRmndrX;
    			}
    			float BlockRmndrY = BlockCheckY % 16;
    			if (BlockRmndrY <= 8)
    			{
    				BlockCheckY = BlockCheckY - BlockRmndrY;
    			}
    			else
    			{ 
    				BlockCheckY = BlockCheckY + 16 - BlockRmndrY;
    			}
    			int BlockPosition = (BlockCheckY & 240)+(BlockCheckX>>4);
    			if (Screen->ComboS [BlockPosition] == 0)
    			{
    				SomariaBlockX = Link->X - 32;
    				SomariaBlockY = Link->Y;
    				float remainder = SomariaBlockX % 16;
    				if (remainder <= 8)
    				{
    					SomariaBlockX = SomariaBlockX - remainder;
    				}
    				else
    				{ 
    					SomariaBlockX = SomariaBlockX + 16 - remainder;
    				}
    				float remainderY = SomariaBlockY % 16;
    				if (remainderY <= 8)
    				{
    					SomariaBlockY = SomariaBlockY - remainderY;
    				}
    				else
    				{
    					SomariaBlockY = SomariaBlockY + 16 - remainderY;
    				}
    				int SomariaBlockPosition = (SomariaBlockY & 240)+(SomariaBlockX>>4);
    				Screen->ComboD [SomariaBlockPosition] = Cmb;
    				Screen->ComboC [SomariaBlockPosition] = CmbC;
    				Screen->ComboF [SomariaBlockPosition] = CmbS;
    			}
    		}
    		else if (Link->Dir == 3)
    		{
    			int BlockCheckY = Link->Y;
    			int BlockCheckX = Link->X + 32;
    			float BlockRmndrX = BlockCheckX % 16;
    			if (BlockRmndrX <= 8)
    			{
    				BlockCheckX = BlockCheckX - BlockRmndrX;
    			}
    			else
    			{
    				BlockCheckX = BlockCheckX + 16 - BlockRmndrX;
    			}
    			float BlockRmndrY = BlockCheckY % 16;
    			if ( BlockRmndrY <= 8 )
    			{
    				BlockCheckY = BlockCheckY - BlockRmndrY;
    			}
    			else
    			{ 
    				BlockCheckY = BlockCheckY + 16 - BlockRmndrY;
    			}
    			int BlockPosition = (BlockCheckY & 240)+(BlockCheckX>>4);
    			if (Screen->ComboS [BlockPosition] == 0)
    			{
    				SomariaBlockX = Link->X + 32;
    				SomariaBlockY = Link->Y;
    				float remainder = SomariaBlockX % 16;
    				if (remainder <= 8)
    				{
    					SomariaBlockX = SomariaBlockX - remainder;
    				}
    				else
    				{ 
    					SomariaBlockX = SomariaBlockX + 16 - remainder;
    				}
    				float remainderY = SomariaBlockY % 16;
    				if (remainderY <= 8)
    				{
    					SomariaBlockY = SomariaBlockY - remainderY;
    				}
    				else
    				{
    					SomariaBlockY = SomariaBlockY + 16 - remainderY;
    				}
    				SomariaBlockPosition = (SomariaBlockY & 240)+(SomariaBlockX>>4);
    				Screen->ComboD [SomariaBlockPosition] = Cmb;
    				Screen->ComboC [SomariaBlockPosition] = CmbC;
    				Screen->ComboF [SomariaBlockPosition] = CmbS;
    			}
    		}
    		LastScreen = CurScreen;
    		LastMap = CurMap;
    		SomariaCheck = 1;
    	}
    }
    That should do it. If it doesn't, I'll check it out later...

  6. #36
    Wizrobe
    Join Date
    Nov 2002
    Posts
    2,819
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    8,461
    Level
    27
    vBActivity - Bars
    Lv. Percent
    77.84%

    Re: Cane Of Somaria Is Here At Last

    I'm getting the following when i try to compile the above script.

    line 22: syntax error: unexpected identifier, expecting number, on token A
    Fatal Error P00: can't open or erase input file!

    I am doing it "as is" however, so i haven't put in any variables or anything. Do i need to edit this script prior to compiling it? If so, how exactly?
    My Zquest Tutorial
    tutorial document

    Working on a quest, I swear i'll finally finish one, one of these days!

    Status:
    --Overworld: 60% done
    --Dungeons: 0% done
    --Misc: 0% done

  7. #37
    Wizrobe
    Join Date
    Nov 2002
    Posts
    2,819
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    8,461
    Level
    27
    vBActivity - Bars
    Lv. Percent
    77.84%

    Re: Cane Of Somaria Is Here At Last

    Actually, i changed my mind--i want to know if this is possible for you to do & if so, can you script this:

    First of all, make it so that when he uses this item, he does the "casting" animation that he does for Nayru's Love. Additionally, sound effect #43 plays. (for whatever reason, when its a custom item, no sound plays by simply inputing 43 into the "sound" box in the item editor) I want it to appear as if he's summoning a copy of himself. The object that appears is a single-tile statue of himself that he can push. It will be a required item for my quest. It's basically used only in certain rooms, like when there's a push block puzzle.

    Make it so that it can only appear on certain combos; perhaps either the first "Unused" combo type, or it can only appear on flag #98, General Purpose 1 (Scripts). Either way, the script checks to see that Link is standing 2 tiles away (or 1 tile away if using the 1-tile script) from an "unused" combo or flag 98 (preferablly the latter, the flag, actually). If so, then it will create the block. If not, nothing happens.

    The reason i want this is so that I can limit the use of this item so that it can only be done on specific tiles, identical looking tiles actually. I want this to be a required item for block puzzles but i dont want it able to appear on some tiles, such as those with a layer on them, like dungeon borders. Additionally, if i can make it appear only on identical looking combos, i can make the block first appear as a "poof" by taking spawn tiles & overlapping them with the floor tile on which the block can appear.

    And lastly, if you try to use it on a space with which you already have used it (so the space is already occupied by a CoS block / statue, then it won't let you do it. Right now, it appears as if it does nothing, but it actually creates a copy of the block / statue right over the existing one, thereby causing you to lose magic. (I have a script assigned to it but it also consumes magic) If you don't have enough magic, you can't use it (and that does happen apparently without a script) Except as is, you continue to lose magic when you use it on a space that you already used it on.
    My Zquest Tutorial
    tutorial document

    Working on a quest, I swear i'll finally finish one, one of these days!

    Status:
    --Overworld: 60% done
    --Dungeons: 0% done
    --Misc: 0% done

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