is it possible to return what facing FID a critter is currently using?i would like to make a mod that sets to hit(and possibly damage) penalties for having your back to the attacker
Nirran
Nirran
Nirran said:is it possible to return what facing FID a critter is currently using?i would like to make a mod that sets to hit(and possibly damage) penalties for having your back to the attacker
Nirran
if (rotation(self_obj) == get_rotation_away_from_dude(self_obj)) then begin
//add here penalty/bonus code
end
if (rotation(dude_obj) == rotation_to_tile(self_obj,dude_obj)) then begin
//penalties
end
rotation_to_tile(tile_num(dude_obj),tile_num(Klint_Ptr))
has_trait(TRAIT_OBJECT,dude_obj,OBJECT_CUR_ROT)
if(has_trait(TRAIT_OBJECT,dude_obj,OBJECT_CUR_ROT) == has_trait(TRAIT_OBJECT,Sulik_Ptr,OBJECT_CUR_ROT)) then
begin
display_msg("Backstab");
end
else
if (has_trait(TRAIT_OBJECT,dude_obj,OBJECT_CUR_ROT) == has_trait(TRAIT_OBJECT,Sulik_Ptr,OBJECT_CUR_ROT ) + 1)
or (has_trait(TRAIT_OBJECT,dude_obj,OBJECT_CUR_ROT) == has_trait(TRAIT_OBJECT,Sulik_Ptr,OBJECT_CUR_ROT) - 1) then begin
display_msg("Rear Flank");
end
else
if (has_trait(TRAIT_OBJECT,dude_obj,OBJECT_CUR_ROT) == has_trait(TRAIT_OBJECT,Sulik_Ptr,OBJECT_CUR_ROT) + 2)
or (has_trait(TRAIT_OBJECT,dude_obj,OBJECT_CUR_ROT) == has_trait(TRAIT_OBJECT,Sulik_Ptr,OBJECT_CUR_ROT) - 2) then begin
display_msg("Front Flank");
end
else
if (has_trait(TRAIT_OBJECT,dude_obj,OBJECT_CUR_ROT) == has_trait(TRAIT_OBJECT,Sulik_Ptr,OBJECT_CUR_ROT) + 3)
or (has_trait(TRAIT_OBJECT,dude_obj,OBJECT_CUR_ROT) == has_trait(TRAIT_OBJECT,Sulik_Ptr,OBJECT_CUR_ROT) - 3) then begin
display_msg("Face to Face");
end