|
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
Serious User
|
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
Junior Member
|
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]
#171493
12/09/07 10:20
12/09/07 10:20
|
Joined: Apr 2006
Posts: 624 DEEP 13
badapple
User
|
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? 
|
|
|
|