Forum

> > CS2D > Scripts > Vehicle that goes into specific Tile
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Vehicle that goes into specific Tile

1 Antwort
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Vehicle that goes into specific Tile

Gorillaz BR
User Off Offline

Zitieren
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

alt Re: Vehicle that goes into specific Tile

EngiN33R
Moderator Off Offline

Zitieren
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
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht