Forum

> > CS2D > Scripts > Image Hitzone
Forums overviewCS2D overview Scripts overviewLog in to reply

English Image Hitzone

4 replies
To the start Previous 1 Next To the start

old Image Hitzone

limonata
User Off Offline

Quote
Hello, may some body make an example for hitzone hook?

1
2
3
4
5
6
7
8
9
10
local img = image("gfx/cat.png",128,128,1)

local hita = imagehitzone(img,101,-32,-32,64,64)

addhook("hitzone","shoot")
function shoot(imgid,pid,obid,wpn,imx,imy)

-- what should i do now ? also i want to make an healt bar it should be decrease when i attack the image.

--Thanks

old Re: Image Hitzone

Infinite Rain
Reviewer Off Offline

Quote
You don't need to use hitzones for that O_o.
Or wait, do you want to make health bar for like custom NPC or what?

old Re: Image Hitzone

limonata
User Off Offline

Quote
I just want to do this:

There will be a cat image and there will be a health bar for this cat when I attack the cat healt bar will be decrease.
Also i should see blood on cat and bullets wont go after cat image.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview