Forum

> > CS2D > Scripts > Spawn projectile
Forums overviewCS2D overview Scripts overviewLog in to reply

English Spawn projectile

7 replies
To the start Previous 1 Next To the start

old Spawn projectile

tos12345678
User Off Offline

Quote
Hi, i need script!

,If player kill' it spawn projectile ON MURDER (SMOKE EFECT) - color: red

old Re: Spawn projectile

EngiN33R
Moderator Off Offline

Quote
Since you said "smoke effect" and mentioned the colour red, I assume you just want red-coloured smoke to appear where the player died.

1
2
3
4
addhook("die", "killsmoke")
function killsmoke(id)
    parse('effect "colorsmoke" '..player(id,'x')..' '..player(id,'y')..' 48 32 255 0 0')
end

old Re: Spawn projectile

tos12345678
User Off Offline

Quote
1
2
3
4
xjaile = 1
yjaile = 1

timer(15000,"parse",'effect "colorsmoke" "..xjaile*6120-60 .." "..yjaile*2490-75) 48 32 255 0 0')

wrong! HELP
edited 1×, last 09.01.16 05:03:51 pm

old Re: Spawn projectile

EngiN33R
Moderator Off Offline

Quote
1
2
3
4
xjaile = 1
yjaile = 1

timer(15000,"parse",'effect "colorsmoke" '.. xjaile*6120-60 ..' '.. yjaile*2490-75 ..' 48 32 255 0 0')

old Re: Spawn projectile

DC
Admin Off Offline

Quote
@user tos12345678: I just wonder why you introduced these "xjaile" and "yjaile" variables. They both have a value of 1 and you just use them to multiply... the effect of all this is: None at all.

So your code can be simplified to:
1
timer(15000,"parse",'effect "colorsmoke" '.. 6120-60 ..' '.. 2490-75 ..' 48 32 255 0 0')

...unless you change the values of the variables somewhere to move the effect. Then they would make sense of course - but probably not in a multiplication with 6120-60 or 2490-75
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview