English Projectile explodes in a certain tile property

5 replies
Goto Page
To the start Previous 1 Next To the start
Up
mrc
User
Offline Off
How to check when a projectile explodes in a certain tile property? For example, when a molotov explodes in a water tile, tile(x,y,""property")==14 doesnt work for it.
CS2DBR Community - http://cs2dbr.tk
04.12.20 03:59:27 pm
Up
Masea
Super User
Offline Off
It should work. We cannot simply predict whether those x and ys are in tiles or in pixels for you. Share the whole code.
Create your UI easy and fast: UI Framework | Go deeper into the darkness and test your bravery: file cs2d Outlast II Modification (28)
04.12.20 04:38:33 pm
Up
mrc
User
Offline Off
err, nvm, I think molotov explodes in water in csgo so I'll let this way
edited 1×, last 04.12.20 05:00:18 pm
CS2DBR Community - http://cs2dbr.tk
04.12.20 08:33:50 pm
Up
VADemon
User
Offline Off
I think the only way is still to track the projectile and remove it with enough time BEFORE the explosion (to account for lag, you cant remove exploded stuff on client-side):

See how I've done this for flares: https://unrealsoftware.de/forum_posts.php?post=428694&goto=428722#post428722
05.12.20 03:42:56 am
Up
MikuAuahDark
User
Offline Off
user Masea has written:
It should work. We cannot simply predict whether those x and ys are in tiles or in pixels for you. Share the whole code.

cs2d lua cmd tile expects the coordinates to be in tiles, so it's safe to assume the x and y are in tiles.
file cs2d LuaJIT for Dedicated Server (12) JIT POWER! | Know your Lua errors! | Part of LÖVE development team since 11.3
05.12.20 03:36:44 pm
Up
Masea
Super User
Offline Off
@user MikuAuahDark: I know but we don't surely know if they are in tiles in his code.
Create your UI easy and fast: UI Framework | Go deeper into the darkness and test your bravery: file cs2d Outlast II Modification (28)
To the start Previous 1 Next To the start