Posted By: boyax
when hit player stuck - 11/26/09 11:32
Hi,
I have here a situation like the player should enter a room where it has entrance & exit door.
How would you detect if the player is entering the room?
My idea is putting a plane collider for each entrance & exit door but it seems when the player hit already the invisible plane collider it stuck for 1-3 seconds then it could pass
code in mind is like
Any idea how I could bypass directly the plane collider?
I can't use vec_dist since the room model has no world position (0,0,0) in WED, it's being position already in Maya.
Thanks
I have here a situation like the player should enter a room where it has entrance & exit door.
How would you detect if the player is entering the room?
My idea is putting a plane collider for each entrance & exit door but it seems when the player hit already the invisible plane collider it stuck for 1-3 seconds then it could pass
code in mind is like
Code:
action act_Entrance() { set(my, POLYGON); my.skill99 = 220; } action act_player() { player = my; //I'm the player wait(1); player.emask |= (ENABLE_IMPACT | ENABLE_ENTITY); player.event = bounce_wall; ... c_move(player, vector(20,0,0), nullvector, IGNORE_PASSABLE | GLIDE); } function bounce_wall() { if(you != NULL) { ... else if(you.skill99 == 220) //hit entrance { //do some stuff;; make the room foggy } } }
Any idea how I could bypass directly the plane collider?
I can't use vec_dist since the room model has no world position (0,0,0) in WED, it's being position already in Maya.
Thanks