ub3rman123 Posted May 22, 2010 Share Posted May 22, 2010 I've created a script to lower aggro range on enemies by having them change factions when the player either activates them, attacks them, or gets within a certain range. Here's the script. SCN SFKAggroScriptref selfbegin onload set self to getselfendbegin onactivate setfactionrank SFKWorgenFaction -1 setfactionrank SFKWorgenFaction2 0 startcombat player activateend begin onhit player setfactionrank SFKWorgenFaction -1 setfactionrank SFKWorgenFaction2 0 startcombat playerend begin gamemode if player.getdistance self <= 400 setfactionrank SFKWorgenFaction -1 setfactionrank SFKWorgenFaction2 0 startcombat player endifendFor some reason, it's become a sort of 'wild card' script. Sometimes the mobs just run at the player and never attack, sometimes it attracts every mob in the room, sometimes just the mobs of the same editor ID as the aggro'd one. Sometimes the mob is not lootable, sometimes the enemy does nothing. Just as some background information, SFKWorgenFaction has a modifiers of 100 to playerfaction, both SFKWorgenFaction and SFKWorgenFaction2, and -100 to preyfaction and SFKDalaranFaction (The NPC's friendly to the player SFKWorgenFaction2 has a modifier of -200 to SFKDalaranFaction, PlayerFaction, PreyFaction, and 100 to both worgen factions. Does anyone know enough about scripting to know what's wrong with this script? If it can't be fixed, I'll have to leave it out and go back to the ways of all enemies just piling up on the player in each cell, because that's better than getting effects like those mentioned earlier. Unless anyone knows of an even better way to make enemies not attack the player until he's close enough. Link to comment Share on other sites More sharing options...
Recommended Posts