Forum

> > CS2D > Scripts > what wrong??
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch what wrong??

5 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt what wrong??

Eternal
User Off Offline

Zitieren
Hello i have a problem , This is problem
when i build teleporter entrance then show me this messages " You can't build here " but buildings have been built

This is code

Spoiler >

alt Re: what wrong??

EngiN33R
Moderator Off Offline

Zitieren
Your problem is that you build on a position where you can't build anything by default and see the message, but as you have a script that places a building where you want to place it regardless of the position, it places it nonetheless. You could do what user MikuAuahDark advises.

alt Re: what wrong??

Spook MQ Hacker
BANNED Off Offline

Zitieren
Spoiler >


not tested and i am a LOOSER making script...

alt Re: what wrong??

EngiN33R
Moderator Off Offline

Zitieren
1
2
3
4
5
6
7
8
9
10
addhook("buildattempt","fastbuild")
function fastbuild(id,type,x,y)
	if tile(x,y,"walkable") then
		if type==13 then
			parse("spawnobject "..type.." "..x.." "..y.." "..player(id,"rot").." 0 "..player(id,"team").." "..id)
			parse("setmoney "..id.." "..player(id, "money") - 3000)
			return 1
		end
	end
end

Since you still haven't figured it out, here's your original code with a little fix. This will only allow you to place buildings on walkable tiles - that is, not walls and obstacles. I think that's what you need.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht