Forum

> > CS2D > Scripts > Block setpos on a wall
Forums overviewCS2D overview Scripts overviewLog in to reply

English Block setpos on a wall

2 replies
To the start Previous 1 Next To the start

old Block setpos on a wall

Mami Tomoe
User Off Offline

Quote
OK I didn't know what to search for but I only found a fix for knock-back

1
2
3
4
5
6
7
8
9
10
11
12
13
14
addhook("projectile","rp_projectile")
function rp_projectile(id,wpn,x,y)
	if wpn == 53 then
		if chance==7 then
			if tile(x, y, "walkable") then
				parse("setpos "..id.." "..x.." "..y)
			else
				rp_msg2(id,color.red,"[SCRIPT]: "..color.yellow.."You have attempted to spawn on a invalid tile.")
			end
		else
			rp_msg2(id,color.red,"[SCRIPT]: "..color.yellow.."Better luck next time.")
		end
	end
end

It doesn't work
No errors just I think the line
if tile(x, y, "walkable")
is not working properly

pls help me idk what to do pls (more cry)
edited 1×, last 07.07.16 03:34:31 pm
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview