![]() |
Blocking Water
Hey there I just got a quick question.
How can I get a script detecting the water as a wall (like on the horse script) so I canīt swim? I already took a quick look at the scripthelp (typed in water) but couldnīt really find anything. |
onwater(x, y)
|
Ik but how can I make it that the player canīt go on it like with a horse? With horses the water is treated like walls. Thats what I want to get that the water in treated like a wall for other "fun" stuff to use
|
You could use a timeout to check if water is ahead of the player by using vecx and vecy:
PHP Code:
PHP Code:
This is how I would have done it if I didn't have my own custom movement system. |
I think the only way you'll be able to achieve this and have it look nice is to use a custom movement system. You could do it with blocking NPCs or so, but that would be a huge pain.
|
Quote:
|
It would be tedious, but you could just always take a picture of the level. Isolate the water only in an image, make the background transparent. Then just put the image of the water on top of the actual levels water and make it block like a normal image. Yet that's a sort of last resort.
|
A solution which will be too much work ;) than Iīd prefer more making the water as blocking tiles in the tileset but thats not what I want ;P
|
If they go on the water, why not just force them off the object that can't go in the water.
Otherwise your best solution is to develop a custom movement system for it. |
Quote:
|
Quote:
|
OHH Ic well now I thought of a Zelda/Atlantis styled thing like drowning when they are on the object;)
|
| All times are GMT +2. The time now is 03:41 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.