kree1 Posted October 11, 2011 Share Posted October 11, 2011 (edited) I'm trying to make a gun which clones the target that you shot, however, the problem I have is that I have put my cloning script on an object effect, and object effects only work if the gun done damage. This will of course turn people hostile. Is there a way of stopping the target from becoming hostile? or If that is impossible then it may be better to just have the cloning script on the weapon normally, my problem here is that I can't get the target that I'm looking at, because GetCrossHairRef only works if you're very close and player.GetCombatTarget only works in combat. Any help at all would be much appreciated. Edited October 11, 2011 by kree1 Link to comment Share on other sites More sharing options...
wallice Posted October 11, 2011 Share Posted October 11, 2011 Have you tried using StopCombat and StopCombatAlarmOnActor in the effect-script? Another way could be giving the weapon a 100% crit. chance and add a crit.Effect (uncheck OnDeath), maybe this works even with 0 damage. Link to comment Share on other sites More sharing options...
rickerhk Posted October 11, 2011 Share Posted October 11, 2011 If you want to use GetCrossHairRef, you can temporarily set a gamesetting for activation distance to 3000 units (or whatever you want the range of the weapon to be). I haven't done it but I've read that it has been done successfully. Link to comment Share on other sites More sharing options...
kree1 Posted October 11, 2011 Author Share Posted October 11, 2011 Thanks so much guys, it now works at range! :biggrin: Another problem though, I'm using PlaceLeveledActorAtMe and it works fine but the actor it creates has a different inventory. I'd like to try to use Remove all items but I need to have the clone's reference id, and unfortunately for me the PlaceLeveledActorAtMe function does not return a reference id. Is there any way I can get this ref id? Link to comment Share on other sites More sharing options...
Recommended Posts