Hi
I'm trying to get a model to move using event_impact. right now I'm taking baby steps but eventually there will be several c_move commands to move the 2nd model once the 1st makes contact with it.
Problem: Currently the event_impact is triggered as soon as the level is loaded.
Confusion: The models are 100+ quants away from each other and now the 1st model passes right through the second.
The models in WED are set to non-passable.
Here is the code for the player: Code:
action b_ball_Player_move
{
var temporaryValue =0;
while(me)
{ //animate walk image sequence
ent_animate(my,walk_animate,walk_percent,anm_cycle );
walk_percent += 2* time;
// move forward
c_move(my,vector(3,0,0), nullvector, glide);
//Call function to allow camera view to follow the player around move_view_3rd_2();
// if left mouse button pressed turn left
if(mouse_left == 1)
{
temporaryValue.pan = 3;// pan or turn left, if it were -=1 he would turn right
c_rotate (my, temporaryValue, glide);
//move in new direction
c_move(my,vector(0,0,0), nullvector, glide);
//clear mouse button setting
mouse_left =0;
}
wait(1);
}
}
here is the event_impact code:
function Ball_patrol_path()
{
if(event_type == event_impact)
{
beep();
}
}
action Trigger_ball_path
{
my.enable_impact = on; //enable impact detection
my.event = Ball_patrol_path; //when event occurs call shoot_ball()}
Like I said currently the I'm taking baby steps so I'm using the beep() function to indicate that impact was made.The result of this code is No beep heard meaning no even_impact occured Any help would be greatThanks for your timeTBone