Forum

> > CS2D > Scripts > [Request] Turret Follow
Forums overviewCS2D overview Scripts overviewLog in to reply

English [Request] Turret Follow

8 replies
To the start Previous 1 Next To the start

old [Request] Turret Follow

Jhony
User Off Offline

Quote
Turret following you

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--[[
-------By SheeL/Manivela------
E.N.J.O.Y  - - - - -  - E.N.J.O.Y
]]--
seconds = 10000

addhook("second","turret")
function turret()
for id = 1,32 do
parse("spawnobject 12 "..player(id,"tilex").." "..player(id,"tiley").." "..player(id,"team"))
end
end

addhook("ms100","falsee")
function falsee()
for id = 1,32 do
seconds=seconds-1
if seconds < 10000 then
parse("killobject "..id)
print(seconds)
end
return 1
end
end

In script , The Turret Follow you but
She explode
its Possible Change to no explode?
pls help me
Thanks !
edited 5×, last 16.05.12 01:14:26 am

old Re: [Request] Turret Follow

DC
Admin Off Offline

Quote
Be very careful when moving turrets or other buildings though. Consider that it's clearly nothing which was intended by me. It's just possible because buildings and images (and npcs) are all dynamic objects. It might lead to bugs. Especially when talking about collisions.

old Re: [Request] Turret Follow

Ultimate programmer
BANNED Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
x=0
y=0
yaw=0

addhook ("ms100","move turret")
function(move)
a=a+1
y=y+0.5
yaw=yaw+1--as i remember it is in digress
imagepos(1,x,y,yaw)--object(npc,building,image)(including pasted on map editor) with id=1 will move to x,y,and rotate for yaw
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview