critter_dmg() prob

fuzzi

It Wandered In From the Wastes
If I give damage to player using critter_dmg(self_obj, etc.. in obj_dude.int than whole script(dude_obj) become paralized until I exit current map.
 
fuzzi said:
If I give damage to player using critter_dmg(self_obj, etc.. in obj_dude.int than whole script(dude_obj) become paralized until I exit current map.
Post the code and we shall attempt to debunk it.
 
Code:
procedure map_update_p_proc begin
 variable koeficient_zraneni;
 variable posledni_odecet_vody;
 posledni_odecet_vody:=(GAME_TIME - local_var(LVAR_Cas))/ONE_GAME_DAY;
 while(posledni_odecet_vody>=1) do begin
  set_local_var(LVAR_Cas,GAME_TIME);
  set_local_var(LVAR_Dehydratace,local_var(LVAR_Dehydratace) + 1);
  posledni_odecet_vody:=posledni_odecet_vody-1;
  while((obj_is_carrying_obj_pid(self_obj,PID_WATER_FLASK) >= 1) AND local_var(LVAR_Dehydratace)>=1) do begin
   set_local_var(LVAR_Cas,game_time);
   set_local_var(LVAR_Dehydratace,local_var(LVAR_Dehydratace) - 1);
   display_msg("Napil jsi se vody");
   rm_obj_from_inven(self_obj,obj_carrying_pid_obj(self_obj,PID_WATER_FLASK));
  end
  display_msg("Stupen dehydratace: " + local_var(LVAR_Dehydratace));
  koeficient_zraneni:=local_var(LVAR_Dehydratace) - (dude_endurance / 2 + 1);
  if(koeficient_zraneni>=1) then begin
   display_msg("Dostal jsi damage: " + koeficient_zraneni * koeficient_zraneni);
   critter_dmg(self_obj,koeficient_zraneni * koeficient_zraneni,1);
  end
 end
end

rest of script is standart obj_dude
but I thing it is game bug rather that some problem in scripts.
 
Back
Top