AIRmichael Posted July 15, 2001 I dont know if any 1 else saw this, but the demon at the end jumped over a fence. He had his hands on it and pushed himself over it. I think this detail proofs how advanced the scripting system will be. 0 Share this post Link to post
Dima Posted July 15, 2001 I don't think there is anyone here who DIDN'T see this! I am serious! That was very hard to miss :) 0 Share this post Link to post
Zaldron Posted July 16, 2001 If my dream comes true (no, not that one), that's not for a scripted sequence, but a real behavior... 0 Share this post Link to post
Dima Posted July 16, 2001 Zaldron - If I am not wrong the enemy behavior in RTCW is scripted right? 0 Share this post Link to post
Zoost Posted July 16, 2001 If my dream comes true (no, not that one), that's not for a scripted sequence, but a real behavior... Although I have no knowledge of these things, I can Imagine that the logic behind such a move could be: If obstacle =< then 1 meter, then jump fence the cool way. Is this scripted or real behavior?? Computers stay machines I guess 0 Share this post Link to post
Disorder Posted July 16, 2001 No offense Zoost, but you make it sound easy as hell. I think it's a little more dificult. Anyway, I hope it's just normal enemy behaviour too. 0 Share this post Link to post
DiSTuRBeD Posted July 16, 2001 Scripted would be like this: When player moves into trigger #4124; Make monster jump over fence. (not very dynamic) Not scripted, like in zald's dream, would be like this: Monster encounters an obstacle, decides to jump over it. :) 0 Share this post Link to post
Zaldron Posted July 16, 2001 The problem would be finding a reason WHY the creature should leap to the other side, checking if there's actually a possible volume both in destination and origin. Destination volume should score less points in the path-finding system than the point pre-leaping. Sync for the animation is hard, specially when the obstacle may be height-variable, and the shape of it can ever be an issue while choosing WHERE the hand should go. IT'S GODDAMN HARD AS HELL 0 Share this post Link to post
Dima Posted July 17, 2001 I want to see how the AI and the scripting work in RTCW. 0 Share this post Link to post
Zoost Posted July 17, 2001 IT'S GODDAMN HARD AS HELL I will not dispute that; but i guess they will not do it the way you describe. OK. another approach. Within the Chase procedure: if run into obstacle Then If obstacle.climable = True then if obstacle.climable.type = Low jump Then Animate cooljump (Low) Handpositioning = obstacle.handplace (coordinates) EASY!!! And that while i have never programmed outside VBA OK iD, I'm available for a consult ;-).Can I play DooM III Then ? 0 Share this post Link to post
maga Posted July 17, 2001 imp.mode := passive lurking := true while (lurking) { imp.pos:=(lurk behind crates) if (player spotted imp) { lurking := false imp.mode := agressive } } ... 0 Share this post Link to post
AIRmichael Posted July 17, 2001 bool fence_jump = false; bool fence_on_x = false; bool fence_on_z = false; float fence_rotation_z; register int select_jump_sound; float x_counter = 0.0f; float y_counter = 0.0f; float z_counter = 0.0f; float demon_health; float demon_height; float jump_height; float fence_distance; float fence_x_or_z_check; float fence_distance_x; float fence_distance_y; float fence_distance_z; float demon_position_x; float demon_position_y; float demon_position_z; float fence_position_x; float fence_position_y; float fence_position_z; float fence_jump_decision; fence_jump_decision = rand()%10; if (fence_jump_decision < 2) { FenceJump(); } glVoid FenceJump() { // check how the fence is placed; if (fence_rotation_z > 70 && < 110) { fence_on_x = true; } if (fence_rotation_z > 160 && < 200) { fence_on_z = true; } if (fence_rotation_z > 250 && < 290) { fence_on_x = true; } if (fence_rotation_z > 340 && < 20) { fence_on_z = true; } // coordinates + rotation of the fence glTranslatef(fence_position_x,fence_position_y,fence_position_z); glRotatef(fence_rotation_z,0.0f,0.0f,1.0f); // render the fence.... (load the model) // ( not going to code the whole load model code:p ) // calculate distance if (fence_position_x > demon_position_x) { fence_distance_x = fence_position_x - demon_position_x; } if (fence_position_x < demon_position_x) { fence_distance_x = demon_position_x - fence_position_x; } if (fence_position_y > demon_position_y) { fence_distance_y = fence_position_y - demon_position_y; } if (fence_position_y < demon_position_y) { fence_distance_y = demon_position_y - fence_position_y; } if (fence_position_z > demon_position_z) { fence_distance_z = fence_position_z - demon_position_z; } if (fence_position_z < demon_position_z) { fence_distance_z = demon_position_z - fence_position_z; } // walk to the fence if (demon_position_x < fence_position_x && x_counter < fence_distance_x) { demon_position_x += 0.5f; x_counter ++; } if (demon_position_x > fence_position_x && x_counter < fence_distance_x) { demon_position_x -= 0.5f; x_counter ++; } if (demon_position_y < fence_position_y && y_counter < fence_distance_y) { demon_position_y += 0.5f; y_counter ++; } if (demon_position_y > fence_position_y && y_counter < fence_distance_y) { demon_position_y -= 0.5f; y_counter ++; } if (demon_position_z < fence_position_z && z_counter < fence_distance_z) { demon_position_z += 0.5f; z_counter ++; } if (demon_position_z > fence_position_z && z_counter < fence_distance_z) { demon_position_z -= 0.5f; z_counter ++; } // jump if fence distance < 1 if (fence_distance_x < 1.0f && fence_distance_y < 1.0f && fence_distance_z < 1.0f) { //calculate jump height jump_height = demon_height + fence_position_y + (demon_health / 100); // jump over the fence if (demon_position_y < jump_height) { demon_position_y += 0.5f; // select demon jump sound; select_jump_sound = rand()%4; if (select_jump_sound == 1) { PlaySound("Sounds/demons/DemJump1.wav", NULL,SND_ASYNC); } if (select_jump_sound == 2) {PlaySound("Sounds/demons/DemJump2.wav", NULL,SND_ASYNC); } if (select_jump_sound == 3) {PlaySound("Sounds/demons/DemJump3.wav", NULL,SND_ASYNC); } if (fence_on_x == true;) { // dont jump on fence but over it if (demon_position_x < (fence_position_x += 1.0f)) demon_position_x += 0.5f; if (fence_distance_x > 1.0f) Fence_Jump = false; if (demon_position_x > (fence_position_x -= 1.0f)) demon_position_x -= 0.5f; if (fence_distance_x > 1.0f) Fence_Jump = false; } if (fence_on_z == true;) { if (demon_position_z < (fence_position_z += 1.0f)) demon_position_z += 0.5f; if (fence_distance_z > 1.0f) Fence_Jump = false; if (demon_position_z > (fence_position_z -= 1.0f)) demon_position_z -= 0.5f; if (fence_distance_z > 1.0f) Fence_Jump = false; } } } 0 Share this post Link to post
AIRmichael Posted July 18, 2001 It doesnt take that much time;), only if someone keeps chatting to you while you're typing it... hehe 0 Share this post Link to post
Zaldron Posted July 19, 2001 My god, DoomBoy, can't you be even more stupid? Why did you quoted all that stuff? Nice code, Air, but now you need to add the part that makes the creature think it is better being in the other side of the "fence". 0 Share this post Link to post
AIRmichael Posted July 21, 2001 If you're on the other side of the fence, it would make sence if the demon tries to be on the other side of the fence as well;). But wouldnt be the other side anymore though hehe. 0 Share this post Link to post
Recommended Posts