Forum

> > CS2D > Scripts > Script Question
Forums overviewCS2D overview Scripts overviewLog in to reply

English Script Question

5 replies
To the start Previous 1 Next To the start

old Script Question

Precel97
User Off Offline

Quote
Hi all! I don't know how to do moving images...
I mean : image .. maybe flare walking behind you. something like x-1...Can someone help?

old Re: Script Question

Flacko
User Off Offline

Quote
Use the imagepos() function with proper parameters along with the "always" hook.

old Re: Script Question

Flacko
User Off Offline

Quote
This displays an image above a player's head.

1
2
3
4
5
6
7
8
9
10
11
image_id = image("gfx/flare.bmp",0,0,1)

addhook("always","_always")
function _always()
	imagepos(image_id,player(1,"x"),player(1,"y")-24,0)
end

addhook("startround","_startround")
function _startround()
	image_id = image("gfx/flare.bmp",0,0,1)
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview