User Tag List

Results 1 to 8 of 8

Thread: Stupid Rising Fireballs.

  1. #1
    Octorok Archangel's Avatar
    Join Date
    Apr 2008
    Age
    34
    Posts
    362
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,732
    Level
    13
    vBActivity - Bars
    Lv. Percent
    94.8%

    Stupid Rising Fireballs.

    First of all so you all can see the desire effect for yourselves. Switch a fire wizzrobes projectile to rising fireballs and make them teleport instead of float. I want a ghoma to fire fireballs in a ring. How can I do this. THis is what I tried.

    Code:
    ffc script Gohma5{
    	void run(int count){
    		while(true){
    			npc gohma = Screen->LoadNPC(2);
    			for(count = 8; count <= 8; count++){ //shoot 8 fireballs in right
    				npc gohma = Screen->LoadNPC(2);
    				eweapon fireball = Screen->CreateEWeapon(145);
    				fireball->X = gohma->X;
    				fireball->Y = gohma->Y;
    				fireball->Dir = count - 1;
    				waitframe();
    			} //ends for loop
    			Waitframes(30);
    		} //ends while loop
    	} //ends void run
    } //ends script
    Compiled just find. Doesn't work worth a shit though. Try it out yourself. Oh and if you want to see what the gohma does, attach it to a digdogger using my displacement script.
    -Archangel-
    Keeping the ZC Developers busy with heavy beta testing skills and experimentation is what I do best. May ZC be bug free!

    You should seriously check advmath.zh out if you use ZC.

  2. #2
    Lynel
    ZC Developer
    pkmnfrk's Avatar
    Join Date
    Jan 2004
    Location
    Toronto
    Age
    37
    Posts
    1,248
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    3,142
    Level
    18
    vBActivity - Bars
    Lv. Percent
    10.56%

    Re: Stupid Rising Fireballs.

    Try this, see if it works: (I highlighted my changes)

    Code:
    ffc script Gohma5{
    	void run(){
    		Waitframes(1);
    		npc gohma = Screen->LoadNPC(2);
    		while(gohma->isValid()){
    			for(int count = 8; count <= 8; count++){ //shoot 8 fireballs in right
    				npc gohma = Screen->LoadNPC(2);
    				eweapon fireball = Screen->CreateEWeapon(145);
    				fireball->X = gohma->X;
    				fireball->Y = gohma->Y;
    				fireball->Dir = count - 1;
    				fireball->Angular = false;
    				Waitframe();
    			} //ends for loop
    			Waitframes(30);
    		} //ends while loop
    	} //ends void run
    } //ends script
    Tale of the Cave - a web comic - Updates Monday, Wednesday, Friday
    ZC Tutorials - Tutorials and Script Library - Updated July 30, 2008
    ZeldaGuard - Corruption in my save files? It's more likely than you think!
    I do script requests!

  3. #3
    The Moldorm Guy Questwizard88's Avatar
    Join Date
    Jul 2002
    Location
    Alunia
    Posts
    1,556
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    3,805
    Level
    19
    vBActivity - Bars
    Lv. Percent
    67.65%

    Re: Stupid Rising Fireballs.

    I think I'm going to give this a shot. I've never messed with FFC scripts yet, but I think I might have found another issue. You're only going to get one weapon to fire with the way you have the count variable set. Since it gets initialized to 8 by the loop, it'll only run that loop once, because the count++ will make it 9 the next time through. Try this (includes the changes from above):
    Code:
    ffc script Gohma5{
    	void run(){
    		Waitframes(1);
    		npc gohma = Screen->LoadNPC(2);
    		while(gohma->isValid()){
    			for(int count = 0; count <= 7; count++){ //shoot 8 fireballs in right
    				npc gohma = Screen->LoadNPC(2);
    				eweapon fireball = Screen->CreateEWeapon(145);
    				fireball->X = gohma->X;
    				fireball->Y = gohma->Y;
    				fireball->Dir = count;
    				fireball->Angular = false;
    				Waitframe();
    			} //ends for loop
    			Waitframes(30);
    		} //ends while loop
    	} //ends void run
    } //ends script
    Dunno if that's right, but assuming what I know from other languages, it should be correct.
    Current Projects: None. Might do something if I ever have the free time again.

  4. #4
    Octorok Archangel's Avatar
    Join Date
    Apr 2008
    Age
    34
    Posts
    362
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,732
    Level
    13
    vBActivity - Bars
    Lv. Percent
    94.8%

    Re: Stupid Rising Fireballs.

    I knew it had something to do with a angle based bool! :)
    Anyways, hopefully when I get around to implementing these two versions and compare them, I'll be able to fix it up. Do some heavy testing, and make a public demo through level 6. All shall bow before my mighty Gohma!
    -Archangel-
    Keeping the ZC Developers busy with heavy beta testing skills and experimentation is what I do best. May ZC be bug free!

    You should seriously check advmath.zh out if you use ZC.

  5. #5
    Lynel
    ZC Developer
    pkmnfrk's Avatar
    Join Date
    Jan 2004
    Location
    Toronto
    Age
    37
    Posts
    1,248
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    3,142
    Level
    18
    vBActivity - Bars
    Lv. Percent
    10.56%

    Re: Stupid Rising Fireballs.

    Quote Originally Posted by Questwizard88 View Post
    I think I'm going to give this a shot. I've never messed with FFC scripts yet, but I think I might have found another issue. You're only going to get one weapon to fire with the way you have the count variable set. Since it gets initialized to 8 by the loop, it'll only run that loop once, because the count++ will make it 9 the next time through. Try this (includes the changes from above):
    Code:
    *snip*
    Dunno if that's right, but assuming what I know from other languages, it should be correct.
    Doh! I can't believe I missed that.

    Alternately, the for() could have been written like:

    Code:
    for(int count = 8; count > 0; count--) {
    But, there's no real benefit in doing that, really.
    Tale of the Cave - a web comic - Updates Monday, Wednesday, Friday
    ZC Tutorials - Tutorials and Script Library - Updated July 30, 2008
    ZeldaGuard - Corruption in my save files? It's more likely than you think!
    I do script requests!

  6. #6
    Octorok
    Join Date
    Jan 2008
    Age
    32
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    939
    Level
    10
    vBActivity - Bars
    Lv. Percent
    63.72%

    Re: Stupid Rising Fireballs.

    I think you actually need to wait 2 frames before using the first Screen->LoadNPC...

  7. #7
    Lynel
    ZC Developer
    pkmnfrk's Avatar
    Join Date
    Jan 2004
    Location
    Toronto
    Age
    37
    Posts
    1,248
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    3,142
    Level
    18
    vBActivity - Bars
    Lv. Percent
    10.56%

    Re: Stupid Rising Fireballs.

    Code:
    ffc script Gohma5{
    	void run(){
    		npc gohma = Screen->LoadNPC(2);
    		while(!gohma->isValid()) {
    			Waitframe();
    			gohma = Screen->LoadNPC(2);
    		}
    		while(gohma->isValid()){
    			for(int count = 0; count <= 7; count++){ //shoot 8 fireballs in right
    				npc gohma = Screen->LoadNPC(2);
    				eweapon fireball = Screen->CreateEWeapon(145);
    				fireball->X = gohma->X;
    				fireball->Y = gohma->Y;
    				fireball->Dir = count;
    				fireball->Angular = false;
    				Waitframe();
    			} //ends for loop
    			Waitframes(30);
    		} //ends while loop
    	} //ends void run
    } //ends script
    Last version, doesn't matter how many frames you need to wait.
    Tale of the Cave - a web comic - Updates Monday, Wednesday, Friday
    ZC Tutorials - Tutorials and Script Library - Updated July 30, 2008
    ZeldaGuard - Corruption in my save files? It's more likely than you think!
    I do script requests!

  8. #8
    Octorok Archangel's Avatar
    Join Date
    Apr 2008
    Age
    34
    Posts
    362
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,732
    Level
    13
    vBActivity - Bars
    Lv. Percent
    94.8%

    Re: Stupid Rising Fireballs.

    Oh well. This one creates the 8 way effects. But doesn't emulate the effect that my example in my initial post does.

    "First of all so you all can see the desire effect for yourselves. Switch a fire wizzrobes projectile to rising fireballs and make them teleport instead of float."
    -Archangel-
    Keeping the ZC Developers busy with heavy beta testing skills and experimentation is what I do best. May ZC be bug free!

    You should seriously check advmath.zh out if you use ZC.

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