Jump to content

Cloning people gun


kree1

Recommended Posts

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 by kree1
Link to comment
Share on other sites

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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...