Originally Posted By: Malice
I don't understand what you are saying about the animation can you please explain more


Sorry, I know I wasn't clear enough ,I was on a hurry. I have an ogre model that keeps patroling in a limited way (ogre active = 0). If the distance between the ogre and the player is less than 500 quants ,and if the ogre detected the player using a simple "c_scan" instruction ,then the ogre moves towards that sneaky player. The distance between them keeps decreasing until it reaches less than 75 (or 100 here after changing) quants. At that moment, the player health (global variable) keeps decreasing and the ogre plays its attack animation



THE PROBLEM: The ogre keeps approaching the player until at a certain extent when the ogre keeps playing its run animation ,but is stopped from moving as if there is an invisible obstacle in its way. Also, the attack animation is so sharp and slow (when I change the pan angle of the player a little bit, the obstacle is gone and the ogre can approach the player and play that boring attack animation)

NOTE: It is correct that "vec_dist" doesn't become less than 100 quants ,but even when I make it "250" for example and it reaches less than 250 quants ,the ogre doesn't leave its place as if there is something in its way (It is not the problem I think)

NOTE 2: I think it is a collision problem (that is why I chose that title) ,but I tried to use "min_x,min_y...etc." and tried to use some functions ,but that doesn't work at all

Originally Posted By: Malice

Also check if the vec_dist is being reached.


place at top of action
Code:
var test_var =0;




modify this if()
Code:
if (vec_dist(my.x,player1.x) <= 100)
  { ogre_active = -1; 
    test_var =vec_dist(my.x,player1.x);
    
  }DEBUG_VAR(test_var,10);



If test_var is never greater then 0 that could be the problem.


I did that and "vec_dist" was successful


Originally Posted By: Malice

It's a little confusing reading the code so I have to help trouble shoot and yes I do not right now know what is wrong or how to fix it. I am thinking it might be the size of the two entities bboxes


I think that ,too. So, I want to know how to make the BBOX as small as possible with respect to the model size (I read the manual ,but it couldn't help me)


Originally Posted By: Malice

EDIT* or maybe after the c_scan you doen't == player1 you can test this to

Code:
if(you == player1)
{ 
   test_var = 1;
}
else
{ 
   test_var = 0;
} 
 DEBUG_VAR(test_var,10);



EDIT moved DEBUG_VAR() out of the if() in second code block


You are close to right. The "c_scan" worked fine ,but after I removed it ,there were no any obstacles grin ,BUT I still have the boring animation problem that the animation is played too slowly ,and after the player dies ,it is played with the normal speed (tell me if you want the player's code)

Originally Posted By: Malice

EDIT one last note - and I could be wrong - but I don't think setting ANM_CYCLE actually modifies the value in the percent_var. I think it just ignores the 3rd digit place so 599 and 199 are viewed simply as 99. So resetting the value of the percent_var should be done or you could end up with a var out of range after long game play.

Code:
my.attack_percentage += 3*time_step;
my.attack_percentage %= 100;


Please correct me if I am wrong because I'd really like to know this information for sure.



don't know but I think that "ANM_CYCLE" ,as you said, reads 199, 299 ...etc. as 99. I will reset the percentage value as you said.


CONCLUSION: There is only one problem bothering me which is the VERY SLOW ANIMATION PROBLEM. When the ogre is close to the player ,it plays its animation like it is a very sharp slow motion animation ,and also tell me how to make the BBOX as small as possible. btw, is there a difference between collision hull and BBOX?


Regards

Last edited by The_KING; 06/22/13 12:05.