Ok, more help please:
Here's my current script, and i've taken multi's advice and put it in the critters script - in this case Arroyo villager:
1) critter_is_prone does not appear to work on KO critters. Anyone know what to use in place of this for KO critters?
2) I'm having trouble getting the critter to follow the player. I've defined the LVARS in the party_add_self macro, and included the party.h file, and it compiles fine - but the critter just won't follow me. Maybe i smell bad?
I CAN get the critter to follow me from map to map, just not WITHIN a map.
Here's the party_add_self macro in party.h:
3) Once i've got the critter to follow the player, I also want him/her to use the zcslave.int script - but i suspect this can't be done. So am i stuck using the AI_slave packet?
Essentially, i want the critter to act like in the zcslave.int script - run away from the player if they get to far away etc.
Here's my current script, and i've taken multi's advice and put it in the critters script - in this case Arroyo villager:
Code:
procedure use_obj_on_p_proc begin
variable UsedItem;
//if (critter_state(self_obj) == CRITTER_IS_PRONE) and (not(combat_is_initialized)) then begin
UsedItem := obj_being_used_with;
if( obj_pid(UsedItem) == PID_ROPE ) then begin
display_msg("slave");//debug message
party_add_self;
//end
end
end
1) critter_is_prone does not appear to work on KO critters. Anyone know what to use in place of this for KO critters?
2) I'm having trouble getting the critter to follow the player. I've defined the LVARS in the party_add_self macro, and included the party.h file, and it compiles fine - but the critter just won't follow me. Maybe i smell bad?
I CAN get the critter to follow me from map to map, just not WITHIN a map.
Here's the party_add_self macro in party.h:
Code:
#define party_add_self if (local_var(LVAR_FOLLOW_DISTANCE) == 0) then begin \
set_default_party_follow; \
end \
debug_msg("join party: " + self_name); \
set_local_var(LVAR_WAITING, 0); \
store_party_team \
critter_add_trait(self_obj, TRAIT_OBJECT, OBJECT_TEAM_NUM, TEAM_PLAYER); \
party_add(self_obj)
3) Once i've got the critter to follow the player, I also want him/her to use the zcslave.int script - but i suspect this can't be done. So am i stuck using the AI_slave packet?
Essentially, i want the critter to act like in the zcslave.int script - run away from the player if they get to far away etc.