Stopping critters attacking
Posted: Fri Jan 30, 2004 1:32 am
Hey
Ok, I have a kinda newbish question, and im pretty annoyed since i just lost the whole damn thing, anyway
Ok, so my first real adventure into scripting involves making a small change in arroyo, so that the plants dont attack on sight, and give you a mission to kill the shamen if you talk to them.
Now the problem arrises when you actually attack the guy, if you kill him without accepting the mission, you get no exp an oof message, and the tribe should muller you, if you take the mission, the tribe shouldnt care and you should get exp
the oof message was to see if everything was excecuting instead of just some of it.
however, the tribe seem to attack you no matter what, the strange thing is, if you kill him then re enter the map, they dont keep attacking you, they just act normally.
so im at a loss as to what I need to do to stop them.
The code for killing critter is
if(not(global_var(GVAR_KILL_MAGE) == QUEST_ACCEPTED)) then begin
inc_good_critter
set_global_var(GVAR_TOWN_REP_ARROYO, global_var(GVAR_TOWN_REP_ARROYO) - 50);
end
else if(global_var(GVAR_KILL_MAGE) == QUEST_ACCEPTED) then begin
set_global_var(GVAR_KILL_MAGE,QUEST_COMPLETED);
display_msg(mstr(300));
inc_general_rep(REP_BONUS_KILL_MAGE);
give_xp(EXP_KILL_MAGE);
end
the code for damaging critter is
if (not(global_var(GVAR_KILL_MAGE) == QUEST_ACCEPTED)) then begin
if (source_obj == dude_obj) then begin
set_local_var(LVAR_Personal_Enemy,1);
set_global_var(GVAR_ENEMY_ARROYO,1);
display_msg(mstr(301));
end
end
else if (global_var(GVAR_KILL_MAGE) == QUEST_ACCEPTED) then begin
if(source_obj == dude_obj) then begin
attack(dude_obj);
end
end
and I even changed the speech node where he gets annoyed and tries to beat 7 worlds of hell out of you.
GVAR_KILL_MAGE is set to QUEST_ACCEPTED when you speak to the plants, and also checks out, because of the whole exp versus no exp thing.
If anyone could suggest a reason and a possible solution as to why they keep attacking, id appreciate it.
Thanks
Pill
Ok, I have a kinda newbish question, and im pretty annoyed since i just lost the whole damn thing, anyway
Ok, so my first real adventure into scripting involves making a small change in arroyo, so that the plants dont attack on sight, and give you a mission to kill the shamen if you talk to them.
Now the problem arrises when you actually attack the guy, if you kill him without accepting the mission, you get no exp an oof message, and the tribe should muller you, if you take the mission, the tribe shouldnt care and you should get exp
the oof message was to see if everything was excecuting instead of just some of it.
however, the tribe seem to attack you no matter what, the strange thing is, if you kill him then re enter the map, they dont keep attacking you, they just act normally.
so im at a loss as to what I need to do to stop them.
The code for killing critter is
if(not(global_var(GVAR_KILL_MAGE) == QUEST_ACCEPTED)) then begin
inc_good_critter
set_global_var(GVAR_TOWN_REP_ARROYO, global_var(GVAR_TOWN_REP_ARROYO) - 50);
end
else if(global_var(GVAR_KILL_MAGE) == QUEST_ACCEPTED) then begin
set_global_var(GVAR_KILL_MAGE,QUEST_COMPLETED);
display_msg(mstr(300));
inc_general_rep(REP_BONUS_KILL_MAGE);
give_xp(EXP_KILL_MAGE);
end
the code for damaging critter is
if (not(global_var(GVAR_KILL_MAGE) == QUEST_ACCEPTED)) then begin
if (source_obj == dude_obj) then begin
set_local_var(LVAR_Personal_Enemy,1);
set_global_var(GVAR_ENEMY_ARROYO,1);
display_msg(mstr(301));
end
end
else if (global_var(GVAR_KILL_MAGE) == QUEST_ACCEPTED) then begin
if(source_obj == dude_obj) then begin
attack(dude_obj);
end
end
and I even changed the speech node where he gets annoyed and tries to beat 7 worlds of hell out of you.
GVAR_KILL_MAGE is set to QUEST_ACCEPTED when you speak to the plants, and also checks out, because of the whole exp versus no exp thing.
If anyone could suggest a reason and a possible solution as to why they keep attacking, id appreciate it.
Thanks
Pill