User Tag List

Page 2 of 2 FirstFirst 1 2
Results 11 to 19 of 19

Thread: Stab/Slash choice.

  1. #11
    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,962
    Level
    33
    vBActivity - Bars
    Lv. Percent
    26.52%

    Re: Stab/Slash choice.

    Well shit. I planned on using those eventually. By read only do you mean that if(Link->Action == 2){ Link->Action = 2;} hehe...Oh where was I ....Oh yeah , you mean read only like that.

    Damnit all. Now i'll have to...
    Wait, You can set the action tab in the item properties, right?



    Edit: It doesn't compile. Russdawn: I would holdout a bit longer as there is currently some scripts under construction.

    SM: Any idea's as too the ffc problem? It'd be a shame to not use the getweapon function you made.
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

  2. #12
    Octorok
    Join Date
    May 2007
    Posts
    331
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,509
    Level
    13
    vBActivity - Bars
    Lv. Percent
    12.36%

    Re: Stab/Slash choice.

    I got your PM Gleeok, I will be working on fixing the script today. It should work just as well if the ffc's are defined within the global script, instead of makeing them a global vairble (which does not work, damn) I did not get a chance to look over your revisions yet but I will, then I'll re-post a working version. I kind of skipped the testing phase entirely and just posted a script that looked like it was going to work, so back to scripting.

    Well here is try#2:

    Code:
    import "std.zh"
    
    //Don't touch these global varibles!!
    bool actStab = false; bool bushBurn = false;
    //*********************************************************
    //You will want to set these varibles to suit your quest
    //For the Stabby Sword:
    //stabImg is the first combo of the sword (faceing up)
    //stabDam is the damage of the stabby sword
    int stabImg = 0; int stabDam = 0;
    //For the Burn->Next script:
    //any combo between bshFst and bshLst is burnable
    //undercombo of burned bush = (bush combo) + bshNext
    int bshFst = 0; int bshLst = 0; int bshNext = 0;
    //*********************************************************
    
    
    global script main_script{
    void run(){
    
    while(true){
    //Handle the stabby sword
    if (actStab == true) {
    weap = Screen->LoadFFC(getWeap());
    if (Link->Dir == 0) {weap->X = Link->X ; weap->Y = Link->Y-16;}
    if (Link->Dir == 1) {weap->X = Link->X ; weap->Y = Link->Y+16;}
    if (Link->Dir == 2) {weap->X = Link->X-16 ; weap->Y = Link->Y;}
    if (Link->Dir == 3) {weap->X = Link->X+16 ; weap->Y = Link->Y;}
    weap->Data = (stabImg+Link->Dir);
    //Setup item 255 to use LTM to make Link appear to be stabbing
    Link->Item[255] = true;
    for (int n=0;n<=3;n++){
    	ene_damage(stabDam,weap->X,weap->Y);
    	//Waitframe();
    	}
    weap->Data = 0;
    Link->Item[255] = false;
    } 
    
    //Handle burn->next
    if (bushBurn == true) {
    ffc flame;
    //Id of invisible combo. change it for your own quest 
    int cmbId = 2;
    flame = Screen->LoadFFC(getWeap());
    flame->Data = cmbId;
    flame->X = Link->X;
    flame->Y = Link->Y;
    for (int move = 0; move < 3; move++){
    	if (Screen->ComboD[ComboAt(flame1->X,flame1->Y)] >= bshFst && Screen->ComboD[ComboAt(flame1->X,flame1->Y)] <= bshLst) {
    		Screen->ComboD[ComboAt(flame1->X,flame1->Y)] += bshNext;
    		}
    	if (Link->Dir == 0) { flame1->Y -= 2;}
    	if (Link->Dir == 1) { flame1->Y += 2;}
    	if (Link->Dir == 2) { flame1->X -= 2;}
    	if (Link->Dir == 3) { flame1->X += 2;}
    }
    } 
    Waitframe();
    }
    }
    }
    
    //**********************************************************************
    //Item scripts
    
    //This is the weapon script for the stabby sword
    //you will need to setup a few things to make it work:
    //Make 4 combos, each showing a sword stabbing (animated if you want)
    //the combos need to be in sequencal order on the combo page
    //make the images depect: stab up, down, left, right in that order
    //You will need to make extra Link tiles depecting him stabbing 
    //*********************************************************
    
    item script stabWeap{
    void run (int img, int dam){
    actStab = true;
    stabImg = img;
    stabDam = dam; 
    }}
    
    //Attach to Blue/Red candle
    item script burnNext{
    void run (){
    bushBurn = true;
    }}
    
    //***********************************************************************
    //Functions
    
    //Function to find an unused FFC, call it like so:
    //weap = Screen->LoadFFC(getWeap());
    //You will be able to use up to 6 FFC weapons at once so, ideally you will never run out
    //Just be sure when you are done with an FFC weapon you set its Data back to 0
    int getWeap(){
    ffc weap1; ffc weap2; ffc weap3; ffc weap4; ffc weap5; ffc weap6;
    weap1 = Screen->LoadFFC(32); 
    weap2 = Screen->LoadFFC(31); 
    weap3 = Screen->LoadFFC(30); 
    weap4 = Screen->LoadFFC(29); 
    weap5 = Screen->LoadFFC(28); 
    weap6 = Screen->LoadFFC(27);
    if (weap1->Data != 0) {return 32;}
    if (weap2->Data != 0) {return 31;}
    if (weap3->Data != 0) {return 30;}
    if (weap4->Data != 0) {return 29;}
    if (weap5->Data != 0) {return 28;}
    if (weap6->Data != 0) {return 27;}
    }
    
    bool ene_damage(int damage,int xn, int yn) {
    	int ene_chk = 1;
    	bool result = false;
    	int push_dir = 0;
    	if (xn<0 || xn>240 || yn<0 || yn>160) {result = true;}		 	
    		while (ene_chk <= Screen->NumNPCs()) {
    			npc trg_ene = Screen->LoadNPC(ene_chk); 	
    			if (trg_ene->X+8 >= xn-8 && trg_ene->X+8 <= xn+24 && trg_ene->Y+8 >= yn-8 && trg_ene->Y+8 <= yn+24) {
    				//Enemy is Hit
    				result = true;
    				int timer = 10;
    				trg_ene->HP -= damage;
    				int def_cset = trg_ene->CSet;
    				
    				while(timer > 0) {
    					//Flash CSet
    					if (trg_ene->CSet <9) {trg_ene->CSet++;} else {trg_ene->CSet = 0;}
    					//Push enemy back
    					//Up,Dn,Lt,Rt
    					if (trg_ene->Y < yn) {
    						if (is_walkable(trg_ene->X,trg_ene->Y-4)) {trg_ene->Y-=4;}
    					}
    					if (trg_ene->Y > yn) {
    						if (is_walkable(trg_ene->X,trg_ene->Y+4)) {trg_ene->Y+=4;}
    					}
    					if (trg_ene->X < xn) {
    						if (is_walkable(trg_ene->X-4,trg_ene->Y)) {trg_ene->X-=4;}
    					}
    					if (trg_ene->X > xn) {
    						if (is_walkable(trg_ene->X+4,trg_ene->Y)) {trg_ene->X+=4;}
    					}
    					timer -= 1;
    					Waitframe();
    				}
    			trg_ene->CSet = def_cset;
    			}
    		ene_chk += 1;
    
    		
    		} //ends while (ene_chk <= Screen->NumNPCs())
    return result;
    }
    
    bool is_walkable(int x, int y)
    {
    	if(x<0 || x>240 || y<0 || y>160)
    	{
    		return false;
    	}
    return Screen->ComboS[y+(x>>4)]==0;
    }
    Test it out, this one should work properly
    (I'm just too busy playing DragonFable to test it :p )

  3. #13
    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,962
    Level
    33
    vBActivity - Bars
    Lv. Percent
    26.52%

    Re: Stab/Slash choice.

    Well...that script works great!!!!

    ...wait, it's a script that crashes zc, right?


    No...a weapon script?

    ..well then it doesn't work so good. :p



    Well here's the fixed version. Just a few typo's and undeclared stuff fixed:

    Code:
    import "std.zh"
    
    //Don't touch these global varibles!!
    bool actStab = false; bool bushBurn = false;
    //*********************************************************
    //You will want to set these varibles to suit your quest
    //For the Stabby Sword:
    //stabImg is the first combo of the sword (faceing up)
    //stabDam is the damage of the stabby sword
    int stabImg = 0; int stabDam = 0;
    //For the Burn->Next script:
    //any combo between bshFst and bshLst is burnable
    //undercombo of burned bush = (bush combo) + bshNext
    int bshFst = 0; int bshLst = 0; int bshNext = 0;
    //*********************************************************
    
    
    global script main_script{
    void run(){
    
    while(true){
    //Handle the stabby sword
    if (actStab == true) {
    ffc weap = Screen->LoadFFC(getWeap());
    if (Link->Dir == 0) {weap->X = Link->X ; weap->Y = Link->Y-16;}
    if (Link->Dir == 1) {weap->X = Link->X ; weap->Y = Link->Y+16;}
    if (Link->Dir == 2) {weap->X = Link->X-16 ; weap->Y = Link->Y;}
    if (Link->Dir == 3) {weap->X = Link->X+16 ; weap->Y = Link->Y;}
    weap->Data = (stabImg+Link->Dir);
    //Setup item 255 to use LTM to make Link appear to be stabbing
    Link->Item[255] = true;
    for (int n=0;n<=3;n++){
    	ene_damage(stabDam,weap->X,weap->Y);
    	//Waitframe();
    	}
    weap->Data = 0;
    Link->Item[255] = false;
    } 
    
    //Handle burn->next
    if (bushBurn == true) {
    ffc flame1;
    //Id of invisible combo. change it for your own quest 
    int cmbId = 2;
    flame1 = Screen->LoadFFC(getWeap());
    flame1->Data = cmbId;
    flame1->X = Link->X;
    flame1->Y = Link->Y;
    for (int move = 0; move < 3; move++){
    	if (Screen->ComboD[ComboAt(flame1->X,flame1->Y)] >= bshFst && Screen->ComboD[ComboAt(flame1->X,flame1->Y)] <= bshLst) {
    		Screen->ComboD[ComboAt(flame1->X,flame1->Y)] += bshNext;
    		}
    	if (Link->Dir == 0) { flame1->Y -= 2;}
    	if (Link->Dir == 1) { flame1->Y += 2;}
    	if (Link->Dir == 2) { flame1->X -= 2;}
    	if (Link->Dir == 3) { flame1->X += 2;}
    }
    } 
    Waitframe();
    }
    }
    }
    
    //**********************************************************************
    //Item scripts
    
    //This is the weapon script for the stabby sword
    //you will need to setup a few things to make it work:
    //Make 4 combos, each showing a sword stabbing (animated if you want)
    //the combos need to be in sequencal order on the combo page
    //make the images depect: stab up, down, left, right in that order
    //You will need to make extra Link tiles depecting him stabbing 
    //*********************************************************
    
    item script stabWeap{
    void run (int img, int dam){
    actStab = true;
    stabImg = img;
    stabDam = dam; 
    }}
    
    //Attach to Blue/Red candle
    item script burnNext{
    void run (){
    bushBurn = true;
    }}
    
    //***********************************************************************
    //Functions
    
    //Function to find an unused FFC, call it like so:
    //weap = Screen->LoadFFC(getWeap());
    //You will be able to use up to 6 FFC weapons at once so, ideally you will never run out
    //Just be sure when you are done with an FFC weapon you set its Data back to 0
    int getWeap(){
    ffc weap1; ffc weap2; ffc weap3; ffc weap4; ffc weap5; ffc weap6;
    weap1 = Screen->LoadFFC(32); 
    weap2 = Screen->LoadFFC(31); 
    weap3 = Screen->LoadFFC(30); 
    weap4 = Screen->LoadFFC(29); 
    weap5 = Screen->LoadFFC(28); 
    weap6 = Screen->LoadFFC(27);
    if (weap1->Data != 0) {return 32;}
    if (weap2->Data != 0) {return 31;}
    if (weap3->Data != 0) {return 30;}
    if (weap4->Data != 0) {return 29;}
    if (weap5->Data != 0) {return 28;}
    if (weap6->Data != 0) {return 27;}
    }
    
    bool ene_damage(int damage,int xn, int yn) {
    	int ene_chk = 1;
    	bool result = false;
    	int push_dir = 0;
    	if (xn<0 || xn>240 || yn<0 || yn>160) {result = true;}		 	
    		while (ene_chk <= Screen->NumNPCs()) {
    			npc trg_ene = Screen->LoadNPC(ene_chk); 	
    			if (trg_ene->X+8 >= xn-8 && trg_ene->X+8 <= xn+24 && trg_ene->Y+8 >= yn-8 && trg_ene->Y+8 <= yn+24) {
    				//Enemy is Hit
    				result = true;
    				int timer = 10;
    				trg_ene->HP -= damage;
    				int def_cset = trg_ene->CSet;
    				
    				while(timer > 0) {
    					//Flash CSet
    					if (trg_ene->CSet <9) {trg_ene->CSet++;} else {trg_ene->CSet = 0;}
    					//Push enemy back
    					//Up,Dn,Lt,Rt
    					if (trg_ene->Y < yn) {
    						if (is_walkable(trg_ene->X,trg_ene->Y-4)) {trg_ene->Y-=4;}
    					}
    					if (trg_ene->Y > yn) {
    						if (is_walkable(trg_ene->X,trg_ene->Y+4)) {trg_ene->Y+=4;}
    					}
    					if (trg_ene->X < xn) {
    						if (is_walkable(trg_ene->X-4,trg_ene->Y)) {trg_ene->X-=4;}
    					}
    					if (trg_ene->X > xn) {
    						if (is_walkable(trg_ene->X+4,trg_ene->Y)) {trg_ene->X+=4;}
    					}
    					timer -= 1;
    					Waitframe();
    				}
    			trg_ene->CSet = def_cset;
    			}
    		ene_chk += 1;
    
    		
    		} //ends while (ene_chk <= Screen->NumNPCs())
    return result;
    }
    
    bool is_walkable(int x, int y)
    {
    	if(x<0 || x>240 || y<0 || y>160)
    	{
    		return false;
    	}
    return Screen->ComboS[y+(x>>4)]==0;
    }

    Now to figure out why it instantly crashes ZC....

    I'm thinking even more ffc woes, as the script fails while trying to place an ffc.....hmm....





    EDIT: --------------------

    The good: After some debugging i've tracked down the problem, and the ffc's are fine.


    The bad: I'm trying to go through your enemy damage system which is confusing. :googly:


    The ugly:




    HAPPY HALLOWEEN!!!





    Hhaha! OK, now that's over with: Here's my findings:
    Code:
    import "std.zh"
    
    
    int weapon_ffc = 24;
    
    
    
    bool is_walkable(int x, int y)
    {
    	return Screen->ComboS[x+y*16]==0;
    }
    
    int stabing = 0;
    int stabImg = 0;
    int stabDam = 0;
    
    //----------------global variables------------------------------------------
    
    
    
    item script stabWeap{
    	void run (int img, int dam){
    		stabImg = img;
    		stabDam = dam;
    		stabing = 1; 
    	}
    }
    
    
    //=======================================================
    //GLOBAL SCRIPT
    //=======================================================
    
    
    global script main_script{
    	void run(){
    
    		//ffc weap1; ffc weap2; ffc weap3; ffc weap4; ffc weap5; ffc weap6;
    
    
    		ffc weapon;
    
    		int stabby_combo = 4;
    
    
    
    		while(true){
    
    
    		//========================
    		// FFC RECYCLING FUNCTION
    		//========================
    
    			if(weapon_ffc >= 29){ weapon_ffc = 24;}
    
    
    
    			//============================================================
    			// WEAPON SCRIPTS
    			//============================================================
    
    			if (stabing == 1) {
    				weapon = Screen->LoadFFC(weapon_ffc);
    				if (Link->Dir == 0) {weapon->X = Link->X ; weapon->Y = Link->Y-16;}
    				if (Link->Dir == 1) {weapon->X = Link->X ; weapon->Y = Link->Y+16;}
    				if (Link->Dir == 2) {weapon->X = Link->X-16 ; weapon->Y = Link->Y;}
    				if (Link->Dir == 3) {weapon->X = Link->X+16 ; weapon->Y = Link->Y;}
    				weapon->Data = (stabby_combo+Link->Dir);
    				weapon_ffc++;
    
    				for (int n=0;n<=3;n++){
    
    					ene_damage(stabDam,weapon->X,weapon->Y);
    				}
    
    				weapon->Data = 0; stabing = 0;
    			}
    			
    			//============================================================
    			// END WEAPON SCRIPTS
    			//============================================================
    
    		Waitframe();
    
    		} 
    	}
    }
    Was unnecesarry.... ..It's the next part:


    Code:
    	//==============================================
    	// ENEMY DAMAGE
    	//==============================================
    
    			bool ene_damage(int damage,int xn, int yn) {
    
    				int ene_chk = 1;
    				bool result = false;
    				int push_dir = 0;
    
    				if (xn<0 || xn>240 || yn<0 || yn>160) {result = true;}
    		 	
    				while (ene_chk <= Screen->NumNPCs()) {
    
    					npc trg_ene = Screen->LoadNPC(ene_chk); 
    	
    					if (trg_ene->X+8 >= xn-8 && trg_ene->X+8 <= xn+24 && trg_ene->Y+8 >= yn-8 && trg_ene->Y+8 <= yn+24) {
    						//Enemy is Hit
    						result = true;
    						int timer = 10;
    						trg_ene->HP -= damage;
    						int def_cset = trg_ene->CSet;
    				
    						while(timer > 0) {
    							//Flash CSet
    							if (trg_ene->CSet <9) {trg_ene->CSet++;} else {trg_ene->CSet = 0;}
    							//Push enemy back
    							//Up,Dn,Lt,Rt
    							if (trg_ene->Y < yn) {
    								if (is_walkable(trg_ene->X,trg_ene->Y-4)) {trg_ene->Y-=4;}
    							}
    							if (trg_ene->Y > yn) {
    								if (is_walkable(trg_ene->X,trg_ene->Y+4)) {trg_ene->Y+=4;}
    							}
    							if (trg_ene->X < xn) {
    								if (is_walkable(trg_ene->X-4,trg_ene->Y)) {trg_ene->X-=4;}
    							}
    							if (trg_ene->X > xn) {								if (is_walkable(trg_ene->X+4,trg_ene->Y)) {trg_ene->X+=4;}
    							}
    							timer -= 1;
    							Waitframe();
    						}
    					trg_ene->CSet = def_cset;
    					}
    				ene_chk += 1;
    
    		
    				} //ends while (ene_chk <= Screen->NumNPCs())
    		return result;
    
    			}
    Which should be fixed in no time at all. :) ..now that we know where the problem is..

    Oh, and I'll include the guard function for shooters and guys also. Don't need any more crashes right.
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

  4. #14
    Octorok
    Join Date
    May 2007
    Posts
    331
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,509
    Level
    13
    vBActivity - Bars
    Lv. Percent
    12.36%

    Re: Stab/Slash choice.

    Wait a minute, what actually caused it to crash ZC?
    Yeah, it crashes instantly! I am going to test some things...

    Also, enemy damage should work fine, its the same script i've been useing for awhile. Although I don't remeber why I have it return a value.. I used it for an old script but why??

    grrr, no wonder it does not work, I posted the wrong version.. I gotta find it(hope I saved it) or just fix it up again...

  5. #15
    Wizrobe C-Dawg's Avatar
    Join Date
    Jan 2002
    Posts
    4,205
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    6,614
    Level
    25
    vBActivity - Bars
    Lv. Percent
    0.38%

    Re: Stab/Slash choice.

    Regarding the Crash : I've had problems with Zelda Classic crashing randomly on certain screens where FFCs and/or scripts are used. Try setting up the script on a different screen and seeing what happens. I have no clue how this happens and I can't reproduce the bug predictably. I think it's some sort of room-based corruption.

    Regarding Slash/Stab :You can set individual Sword items to allow slash or not. So just make two identical swords for each sword you want in the game, and have a script switch the inventory depending on the player's choice to stab or slash.

  6. #16
    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,962
    Level
    33
    vBActivity - Bars
    Lv. Percent
    26.52%

    Re: Stab/Slash choice.

    Uh, oh. Well more info and It seems that there's another thing I just ran into.

    I rewrote the entire damage code into the while loop of the global itself...It crashed.

    I rewrote a simple sword item ffc script to replace stabby sword; It crashed.

    I re-rewrote the damage code to a basic version: IE no cset flash, no knockback, a set 2 damage......It still crashed.


    So I give up on the idea of making it global. I suggest an ffc script instead. I'm starting on that right now.

    May god have mercy...
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

  7. #17
    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,962
    Level
    33
    vBActivity - Bars
    Lv. Percent
    26.52%

    Re: Stab/Slash choice.

    Would you still like an ffc sword?

    I'm going to start posting scripts eventually of ffc weapons so anyone with a little scripting know-how could make their own custom weapons.

    The ffc sword i'm making can be lttp style slash, spear thrust, axe club, whatever you make the animation to be. It uses combo cycling and multi slash ability, with alternate graphics for quick button presses. Sound good?
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

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

    Re: Stab/Slash choice.

    That sounds good. So basically it allows you to stab or slash?
    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?


  9. #19
    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,962
    Level
    33
    vBActivity - Bars
    Lv. Percent
    26.52%

    Re: Stab/Slash choice.

    Custom weapon script #1. This uses the built in hit detection of the game. allows multi slashing. Good for LTTP slash, or spear, or whatever animation you can draw. Yes, you have to draw. :p


    Code:
    int sword_delay = 0;
    
    item script slash{
    
    	void run(){
    
    		int sword = 16; //set to combo of sword
    		ffc this1 = Screen->LoadFFC(24); // set to whatever you want
    
    		if(sword > 8 && sword_delay == 0){
    
    			if(Link->Dir == 0) {
    				this1->X = Link->X; 
    				this1->Y = Link->Y - 16;
    				this1->Data = sword;
    			}
    			if(Link->Dir == 1) {
    				this1->X = Link->X; 
    				this1->Y = Link->Y + 16;
    				this1->Data = sword+1;
    			}
    			if(Link->Dir == 2) {
    				this1->X = Link->X - 16; 
    				this1->Y = Link->Y;
    				this1->Data = sword+2;
    			}
    			if(Link->Dir == 3) {
    				this1->X = Link->X + 16; 
    				this1->Y = Link->Y;
    				this1->Data = sword+3;
    			}
    			sword_delay = 15;
    		}
    	}
    }
    	
    
    
    ffc script sword_slash{
    
    	void run(){
    
    		int sword = 20;
    
    		while(true){
    
    			if(sword_delay > 0){sword_delay--;}
    			Waitframe();
    
    			if(this->Data > 6 && sword_delay > 0){
    
    				if(sword_delay <= 10 && sword_delay > 5){
    
    					if(Link->Dir == 0){
    						this->X = Link->X; 
    						this->Y = Link->Y - 16;
    						this->Data = sword;
    					}
    					if(Link->Dir == 1){
    						this->X = Link->X; 
    						this->Y = Link->Y + 16;
    						this->Data = sword+1;
    					}
    					if(Link->Dir == 2){
    						this->X = Link->X - 16; 
    						this->Y = Link->Y;
    						this->Data = sword+2;
    					}
    					if(Link->Dir == 3){
    						this->X = Link->X + 16; 
    						this->Y = Link->Y;
    						this->Data = sword+3;
    					}
    				}
    				if(sword_delay <= 5){
    
    					if(Link->Dir == 0){
    						this->X = Link->X; 
    						this->Y = Link->Y - 16;
    						this->Data = sword+4;
    					}
    					if(Link->Dir == 1){
    						this->X = Link->X; 
    						this->Y = Link->Y + 16;
    						this->Data = sword+5;
    					}
    					if(Link->Dir == 2){
    						this->X = Link->X - 16; 
    						this->Y = Link->Y;
    						this->Data = sword+6;
    					}
    					if(Link->Dir == 3){
    						this->X = Link->X + 16; 
    						this->Y = Link->Y;
    						this->Data = sword+7;
    					}
    				}
    			}
    		}
    	}
    }
    Set combos like so:

    Code:
    XXXX-------combo cycles to ---UDLR - :Main attack:- finish by combo cycling to third row.
    XXXX-------combo cycles to ---UDLR - :Quick attack:
    UDLR-------ending animation of main attack
    You need five rows of combos.
    -first row: frames 0, speed 0. cycles to fourth row,f rames 6, speed 3, then that row cycles to the third row.
    -second row: frames 0 speed 0,cycles to fifth row: frames 3 speed 3.
    -third row: frames 3, speed 2.

    You can change these as it's just a suggestion...just don't make the animation too long....

    So to recap:

    B-blank, E-ending animation, U-up,D-down, L-left,R-right animation.

    BBBB
    BBBB
    EEEE
    UDLR
    UDLR

    ...oh and DISABLE SLASH!!!!! AND SET ITEM SPRITES TO BLANK!


    ...Have fun.
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

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