What the example is doing is adjusting how those factions feel about each other based on a persistently stored value. It's the sort of thing that might run OnModuleLoad. For an OnPhysicalAttacked script, you'd wanna do the following:
void main()
{
// Get the PC and Dojo faction focus object
object oPC = GetLastAttacker();
object oDojo = GetObjectByTag("Faction_Focus_Dojo");
// Adjust how the Dojo feels about the PC
AdjustReputation(oPC, oDojo, -100);
}
Note that we don't get a faction focus for the PC. We just get him instead.
Modifié par Squatting Monk, 16 juin 2013 - 02:30 .