Jump to content

Photo

LA Flamethrower

Enemy FFC

  • Please log in to reply
3 replies to this topic

#1 Orithan

Orithan

    Studying Scientist - Commission from Silvixen

  • Members
  • Gender:Male
  • Location:Australia

Posted 17 July 2012 - 12:09 AM

LA Flamethrower


Description

This script emulates the Flamethrower from LA. It spews out flames (the Fire EWeapon) constantly in one direction from the FFC. In LA, you encounter it in a cave while on your way to Turtle Rock and you were required to use the Mirror Shield to pass through it. Note: It is compatible with movement and changer FFCs.

Screenshots and Demo

Posted Image
This is just one of them in action.

Posted Image
Four of them in action!

Posted Image
Yay! It is moving!

Code

ffc script LA_Flamethrower{ //The Flame Shooter from LA. Seen in the cave leading up to Turtle Rock, it fires flames in one direction at a rapid pace. D0 is for the direction it fires in (0 = Up, 1 = Down, 2 = Left, 3 = Right), D1 is how frequently it shoots flames and D2 is the amout of damage that the flames do to Link.
	void run(int direction, int frequency, int damage){ //Declares all of the D-variables.
		int counter; //Declares the counter variable.
		eweapon weapon;
		while(true){ //So that this will run on the screen indefinetley.
			if(counter % frequency == frequency - 1){ //Every frequency frames...
				weapon = CreateEWeaponAt(EW_FIRE, this->X, this->Y); //Fire the EWeapon.
				if(damage == 0){ //Set the amount damage it causes to Link in quarter hearts. Default to 16, which is four hearts (The same strengh as the flames it spewed out in LA).
					weapon->Damage = 16;
				}
				else if(damage == -1){ //Set damage to -1 so that it will spew out flames that only serve to tickle Link.
					weapon->Damage = 0;
				}
				else{ //If damage is set to anything else, leave it as is.
					weapon->Damage = damage;
				}
				Game->PlaySound(SFX_FIRE); //Play the Fire SFX.
				weapon->Dir = direction; //Set its direction.
			}
			counter ++; //Increments the counter variable.
			Waitframe(); //The Waitframe. Every while-loop MUST have one or the game will freeze!
		}
	}
}


Setup
  • Copy-paste the code into your script file and then compile it.
  • Find the tiles/sprites you are going to use and have them comboed. It is advisable to have combos of them in all four directions.
  • Set up the FFC: Set its combo to the comboed sprites/tiles you intend to use. Set D0 to the direction that it will be facing (0 = Up, 1 = Down, 2 = Left, 3 = Right), set D1 to the amount of time (in frames) between firing flames (it is not advisable to set it to anything lower than 2) and set D2 to the amount of damage the flames do to Link in quarter-hearts (Default to 16, which is 4 hearts and the same amount of damage as they did in LA. Set it to -1 for the flames to do 0 damage). In order to have them move, set the speeds variables and changers as you would do with normal FFCs.
  • Enjoy!
Resources

Only std.zh is needed.

#2 Torgue

Torgue

    Newbie

  • Members

Posted 31 January 2014 - 06:36 PM


Is there a way to make the combo solid and be able to push it? Increase the range of the projectile?

Edited by Torgue, 31 January 2014 - 06:37 PM.


#3 MoscowModder

MoscowModder

    Still fighting the inevitable

  • Members
  • Gender:Male
  • Location:Wisconsin (WHAT)

Posted 31 January 2014 - 07:31 PM

Solid and pushing: that's complicated.

 

Range: under this line

weapon->Dir = direction; //Set its direction.

 

Add this:

weapon->Step = 100;

Adjust the value to your liking.


  • Torgue likes this

#4 Torgue

Torgue

    Newbie

  • Members

Posted 02 February 2014 - 12:43 AM

thank you for that, its helpful!



Also tagged with one or more of these keywords: Enemy, FFC

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users