Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
4 registered members (AndrewAMD, TipmyPip, NewbieZorro, Grant), 14,196 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Raining inside the houses #171486
12/06/07 18:14
12/06/07 18:14
Joined: Sep 2006
Posts: 292
M
Mythran Offline OP
Member
Mythran  Offline OP
Member
M

Joined: Sep 2006
Posts: 292
How do i prevent the rain to pass throught the models?
When it's raining and i enter the house, it's raining inside...

Thanks in advance

Re: Raining inside the houses [Re: Mythran] #171487
12/06/07 19:39
12/06/07 19:39
Joined: Jan 2007
Posts: 1,619
Germany
Scorpion Offline
Serious User
Scorpion  Offline
Serious User

Joined: Jan 2007
Posts: 1,619
Germany
-make a trigger, that turns rain off, if youare in the house
-use ent_move with a raindrop and destroy if it collides
-use c_content to check if the position of the raindrop is in a solid block (but hee is the disadvantage, that they can fall "trough" the wall if they are too fast)

Re: Raining inside the houses [Re: Scorpion] #171488
12/06/07 23:36
12/06/07 23:36
Joined: Sep 2006
Posts: 292
M
Mythran Offline OP
Member
Mythran  Offline OP
Member
M

Joined: Sep 2006
Posts: 292
The middle one seems to be what i want, can you be more specific about how to implement such a code?
Thanks

Re: Raining inside the houses [Re: Mythran] #171489
12/07/07 18:18
12/07/07 18:18
Joined: Jan 2007
Posts: 1,619
Germany
Scorpion Offline
Serious User
Scorpion  Offline
Serious User

Joined: Jan 2007
Posts: 1,619
Germany
you create randomly single rainsdrops over the players position (must be entites/sprites)
and just move them down with a c_move:
Code:
c_move(me,nullvector,vector(0,0,-10),IGNORE_PASSABLE)


and after that move you can check the trace_hit varialbe if something was hit => move the entity up again.

Re: Raining inside the houses [Re: Scorpion] #171490
12/08/07 23:00
12/08/07 23:00
Joined: Dec 2006
Posts: 78
Nevada, USA
Futurulus Offline
Junior Member
Futurulus  Offline
Junior Member

Joined: Dec 2006
Posts: 78
Nevada, USA
Yikes, though -- c_move with raindrops will be SLOOOOWWW...

Using c_trace might be faster, and you can use it with particles too. Trace from the current position to the next position, and if it hits something, destroy it:
Code:
var endpos[3]; // VECTOR endpos in Lite-C
vec_set(endpos, my.x);
vec_add(endpos, my.vel_x);
c_trace(my.x, endpos, IGNORE_PASSABLE || IGNORE_PASSENTS);
if(trace_hit) {my.lifespan = 0;}



Re: Raining inside the houses [Re: Futurulus] #171491
12/09/07 00:05
12/09/07 00:05
Joined: Sep 2006
Posts: 292
M
Mythran Offline OP
Member
Mythran  Offline OP
Member
M

Joined: Sep 2006
Posts: 292
I don't use lite-c
Do i place it in the raining function?

Re: Raining inside the houses [Re: Mythran] #171492
12/09/07 01:03
12/09/07 01:03
Joined: Dec 2006
Posts: 78
Nevada, USA
Futurulus Offline
Junior Member
Futurulus  Offline
Junior Member

Joined: Dec 2006
Posts: 78
Nevada, USA
You'd put it in the action or particle function for your raindrops. If you're using entities instead of particles, use ent_remove(me) instead of my.lifespan = 0.

Re: Raining inside the houses [Re: Futurulus] #171493
12/09/07 10:20
12/09/07 10:20
Joined: Apr 2006
Posts: 624
DEEP 13
badapple Offline
User
badapple  Offline
User

Joined: Apr 2006
Posts: 624
DEEP 13
you could do a trace instruction upwards to look for a roof every so often
and create a global var ...say var im_inside=0; and if trace hits a roof
above you can change im_inside=1; , in the while loop that controls your rain
put an if statement like so

while(1)
{
if(im_inside==0)
{
rain
}
else
{wait(1);
}
wait(1);
}

know what i mean?

Re: Raining inside the houses [Re: badapple] #171494
12/09/07 15:12
12/09/07 15:12
Joined: Jan 2007
Posts: 1,619
Germany
Scorpion Offline
Serious User
Scorpion  Offline
Serious User

Joined: Jan 2007
Posts: 1,619
Germany
c_move is slow if you use GLIDE...else its not that slow-if you compare it with c_trace. So don't Yike around

Re: Raining inside the houses [Re: Scorpion] #171495
12/09/07 16:12
12/09/07 16:12
Joined: Sep 2006
Posts: 292
M
Mythran Offline OP
Member
Mythran  Offline OP
Member
M

Joined: Sep 2006
Posts: 292
Thanks alot for all you're help

Page 1 of 2 1 2

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

Gamestudio download | 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