KazFoxsen Posted June 3, 2011 Share Posted June 3, 2011 I'm working on a quest script which requires a reference to the last actor the player hit, but can't get it to work. It would be a lot easier if I could use "begin OnHit," but the script won't save unless it's put into an object script, which I can't use because it would be impractical to put a new bit of script on every NPC. I'm trying to work around this without luck. I've tried player.isincombat with no result, and GetCombatTarget doesn't work on the PC. Is there anything else I can do? This is what I've got so far: ref LastHitref Vic1 begin GameMode if getstage MandaCrippleQuest < 10 return else set LastHit to player.getattacked if (LastHit.GetDead == 1) || (LastHit.GetIsCreature == 1) return else set Vic1 to LastHit ;if LastHit fits passes the victim requirements, the ref is stored as Vic1 ShowMessage MandaTestCombat ;just a test to see if it works, which it doesn't endif endif ;more stuffend Link to comment Share on other sites More sharing options...
KazFoxsen Posted June 4, 2011 Author Share Posted June 4, 2011 Bump. Link to comment Share on other sites More sharing options...
Recommended Posts