Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, Grant, Neb), 908 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
detecting water #383324
09/19/11 00:03
09/19/11 00:03
Joined: Mar 2003
Posts: 1,524
Canada
Stansmedia Offline OP
Serious User
Stansmedia  Offline OP
Serious User

Joined: Mar 2003
Posts: 1,524
Canada
I was wondering if anybody could share their method for detecting if a player is within water and what you use (wmb? wed block?). The manual seems to be filled with obsolete calls.


Decessus - 80% done. 100% abandoned.
GET MY ANDROID GAME! https://play.google.com/store/apps/details?id=com.lasertrain.zspinballfree&hl=en
Re: detecting water [Re: Stansmedia] #383325
09/19/11 00:25
09/19/11 00:25
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
A simple way would be to place regions in WED, call them "water" and use region_check("water",player.x,...).


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: detecting water [Re: Superku] #383327
09/19/11 00:45
09/19/11 00:45
Joined: Mar 2003
Posts: 1,524
Canada
Stansmedia Offline OP
Serious User
Stansmedia  Offline OP
Serious User

Joined: Mar 2003
Posts: 1,524
Canada
Thanks!


Decessus - 80% done. 100% abandoned.
GET MY ANDROID GAME! https://play.google.com/store/apps/details?id=com.lasertrain.zspinballfree&hl=en
Re: detecting water [Re: Stansmedia] #383330
09/19/11 02:46
09/19/11 02:46
Joined: Dec 2003
Posts: 988
Germany, Magdeburg
JoGa Offline
User
JoGa  Offline
User

Joined: Dec 2003
Posts: 988
Germany, Magdeburg
another simply workaround would be:

Take a terrain or a flat modell and make it passable.
Code:
#define object_type skill30 // in skill30 is the type of entity stored

var obj_id_slippery_banana = 50;
var obj_id_water = 51;
var obj_id_lava = 52;



Now you can let your player trace at the ground.
If you want to have something like water, check if you is filled after the trace and check with "if(you.object_type == obj_id_water)" if it's water and now you can eg. emit some water-particles in the instructions of your if-query.
I don't know if its the best solution, but it works for me :-D (because my water is not as deep as the origin of the player, so he is always on top of it and find the watersurface with his gravity-trace)

Last edited by JoGa; 09/19/11 02:48.

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1