How to spawn/create Env_Breakable using lua? So that's the question. If you know, then please write code.
Forum
CS2D Scripts [Q] Spawn blocks[Q] Spawn blocks
5 Antworten 1
How to spawn/create Env_Breakable using lua? So that's the question. If you know, then please write code.
Apache uwu hat geschrieben
A better solution would be to spawn walls, and place images over them.
ye, or make imaginary blocks. You can have a dictionary to save the "old" player position (x and y) and a table of two dimentions to save the blocks positions. With the tilemove hook you can know if the player moved to another tile, so you check if there isn't any block in that tile (i.e.: if block[newx][newy] ~= nil...), otherwise it sends the player to his/her last position (i.e.: parse("setpos "..id.." "..playerpos[id].oldx.." "..playerpos[id].oldy)). Then you just could add the blocks like block[X][Y] = true, and place an image over there if you want.
Apache uwu hat geschrieben
@ Heartless Soldier: That would work on lan/single player, however if this was say--over 100 ping, the player would lag back to his/her original location.
Good point. Then add this line: parse("mp_pinglimit 80") to the script
1