Forum

> > CS2D > Scripts > Alpha Fade Tween for a Certain Player
Forums overviewCS2D overview Scripts overviewLog in to reply

English Alpha Fade Tween for a Certain Player

1 reply
To the start Previous 1 Next To the start

old Alpha Fade Tween for a Certain Player

Dousea
User Off Offline

Quote
Well, as the title, I am trying to make an alpha fade tween visible to a certain player only. I think it's possible but I don't know how to make it. I am trying to make it with this script:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
...

addhook([[kill]], [[ar_kill]])
function ar_kill(pl)

	...
	
	ar.img[pl] = image(ar_gfxDir..[[hud_notification.png]], 0, 0, 2, pl)
	imagepos(ar.img[pl], 520, 320, 0)
	
	timer(3500, [[ar_tween_alpha]])
	function ar_tween_alpha()
		tween_alpha(ar.img[pl], 100, 0.0)
	end
	
end

Trying to be user SQ, . Actually my script a little longer than that, it covered by three dots over there but it shows my point. I create a cs2d lua cmd tween_alpha command to make an alpha fade tween for a certain player only by making ar.img variable created for each player. It contain an image that I want to show for players. But the way that I use still doesn't work. When trying in the game, the image added one by one when player killing someone so that when the image is too much, it makes the game become broken.

Before I am trying to make an alpha fade tween visible for a certain player only, ar.img variable is not for each player. Just regular variable that created for everyone not "each" one. I think the cs2d lua cmd tween_alpha and other tween thing command needs another paramater. The name of the parameter should be [pl], it is optional, only if you want the tween for images to be visible to a certain player.

If make an alpha fade tween visible for a certain player only is possible, please help me on this one.
Remember, I have cookie, cookie even cookies, cookies .
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview