Forum

> > Stranded II > Scripts > Tower and Arrow damage
Forums overviewStranded II overview Scripts overviewLog in to reply

English Tower and Arrow damage

4 replies
To the start Previous 1 Next To the start

old Tower and Arrow damage

Xephoriah
User Off Offline

Quote
I am playing around with the code from the Tower defense gamemode, and I need to make a stronger tower for the stronger enemies i have implemented. however i cannot seem to find the factor for the amount of damage the arrows do, lvl 1 does 5, lvl 2 does 7 and lvl 3 does 9 and so on, but where do I find the code that makes the towers actually do that much damage, the one i want shoots fire arrows and does 19 damage.

old Re: Tower and Arrow damage

Xephoriah
User Off Offline

Quote
yes, the arrow has a base damage, but i think the tower adjusts the damage. Here is the code for the Lvl.3 tower
1
{ projectile 53,$fx,$fy,$fz,5,300,50,0,15,0.5625,0; }
to my understanding, all I really can understand is: 15 is speed, and 53 is the type of projectile, aka the item id. that's pretty much it, the other things...
1
{ projectile 53,?,?,?,?,?,?,?,15,?,?; }
if i could please have an explanation for what the ?s i put are really, it would give me a better understanding on what I'm working with, thanks.

old Re: Tower and Arrow damage

JasJack67
Super User Off Offline

Quote
Quote
Example 1: Defense Tower shoots at only hostile units:
projectile Item Id,x,y,z,mode,range,damage,drag;

In this example the variable $y has 28 added to it...this is the height of the projectile(arrow) off the ground where it appears to come out of the Defense Tower.

1
2
3
4
5
6
7
8
on:timer {
		local $x,$y,$z;
		$x=getx("self");
		$y=gety("self");
		$z=getz("self");
		$y+=28;
		projectile 53,$x,$y,$z,6,350,15,59;
	}

Also note: The mode for the defense tower is set to 6. Which you can see the modes in the "more +" below. So it shoots at hostile units...units with the behavior of "raptor". The 350 is the Range that they talk about in mode 6.

The Defense Tower arrow does 15 Damage.

Drag is 59, how far before the arrow loses momentum and falls to the ground.


Quote
Example 2: Native Bowman shoots Fire Arrow at the player

projectile Item Id,x,y,z,mode,speed,damage,drag;

In this example the variable $y has 28 added to it...this is the height of the projectile(arrow) off the ground where it appears to be shot from the bow native.

1
2
3
4
5
6
7
8
9
on:timer {
    if (lives("self")==1){
	local $x,$y,$z;
	$x=getx("self");
	$y=gety("self");
	$z=getz("self");
	$y+=28;
	projectile 56,$x,$y,$z,4,70,10,50;
    }

Also note: The mode for the Native's Arrow is set to 4. Which you can see the modes in the "more +" below. So it shoots at the player. The 70 is the Speed, 10 is the Damage, and 50 is the Drag

}


More >
edited 8×, last 05.04.15 02:40:41 pm

old Re: Tower and Arrow damage

Xephoriah
User Off Offline

Quote
Thank you, you have explained it very well. I understand now that the arrow itself does 16 damage, so i will try to make an arrow that causes a fixed amount of damage, so it's easier to work with, this also will help me with other things in the future! thanks!
To the start Previous 1 Next To the start
Log in to reply Scripts overviewStranded II overviewForums overview