Forum

> > CS2D > Scripts > Vehicle that goes into specific Tile
Forums overviewCS2D overview Scripts overviewLog in to reply

English Vehicle that goes into specific Tile

1 reply
To the start Previous 1 Next To the start

old Vehicle that goes into specific Tile

Gorillaz BR
User Off Offline

Quote
I wish you would help me in a script, is as follows:

You says "!vehicle" and a vehicle to appear in front of you(sprite) and when you press E it down And you can walk on it, it equal to a car.but he can WALK ONLY A ESPECIFIC TILE!
example: water.If he dont walk on WATER TILE , explodes.
can help me?

sorry for bad english

old Re: Vehicle that goes into specific Tile

EngiN33R
Moderator Off Offline

Quote
Make so when you enter the vehicle, a variable inVehicle[id] is set to true.

1
2
3
4
5
6
7
8
9
addhook("movetile","tilerestriction")
function tilerestriction(id,x,y)
	if (inVehicle[id]) then
		if not (tile(x,y,"property")==14) then
			--WRITE DELETION OF CAR HERE
			parse("explosion "..(x*32+16).." "..(y*32+16).." 128 150 "..id)
		end
	end
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview