Forum

> > CS2D > Scripts > Airstrike-Bigger boom
Forums overviewCS2D overview Scripts overviewLog in to reply

English Airstrike-Bigger boom

2 replies
To the start Previous 1 Next To the start

old Airstrike-Bigger boom

SkullFace
User Off Offline

Quote
I've got a tiny problem with this script.

1
2
3
4
5
6
addhook("projectile","airstrikeBoom")
function airstrikeBoom(id,weapon,x1,y1)
	if (weapon==76) then
	parse("explosion "..x1.." "..y1.." 128 3000 "..id.." ")
	end
end

My reference was this
> http://unrealsoftware.de/forum_posts.php?post=375212&goto=376257#post376257

My goal is to add more explosions to airstrike. So it's not 1 explosion but more explosions randomized around the projectile position.

old Re: Airstrike-Bigger boom

Waldin
User Off Offline

Quote
please dont concatenate an empty string
also i think the dmg is too much but well change if u want
(air strike damage is 1500 by default) http://www.cs2d.com/weapons.php?slot=-1#item76
also change how much explosions do you want
1
2
3
4
5
6
7
8
9
addhook("projectile","airstrikeBoom")
function airstrikeBoom(id,weapon,x1,y1)
	if (weapon==76) then
		for i = 1, 5 do --change this last number if you want less or more explosions
			local x, y = math.random(x1 - 64, x1 + 64), math.random(y1 - 64, y1 + 64) -- change those if you want less or more explosion area
			parse("explosion "..x.." "..y.." 128 3000 "..id)
		end
	end
end

this explosions are random and at same time, if you want some delay between explosions and some space too ask for it or do it yourself

old Re: Airstrike-Bigger boom

SkullFace
User Off Offline

Quote
@user Waldin: Thanks again, Waldin!

Here's the end result I've ended up with.

EDIT2: Ouch, seems like after using airstrike will then make any other projectile trigger these explosions.

Not working:
Spoiler >


FIX:
Spoiler >
edited 2×, last 15.02.18 12:47:14 pm
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview