View unanswered posts | View active topics It is currently Tue Apr 16, 2024 6:16 am



Reply to topic  [ 3 posts ] 
 [Help] Two-Legged Turrets 
Author Message
User avatar

Joined: Mon Oct 22, 2012 4:09 am
Posts: 22
Location: Columbus, Ohio
Reply with quote
Post [Help] Two-Legged Turrets
I'm presently working on a relatively unusual actor and I've run into a snag. I'm working off of an AHuman base for bipedal legs and proper jetpack balance. The issue is that I want it set up with turret-like weapons that it can't drop, but can be shot off of it. I had a look at this topic and, while Bad Boy's code helped me whip up a neat little side-function that prevents it from picking up new weapons, I can't quite get the HDFirearm to go back into its inventory when dropped.

So far, the code I've modified is looking like this:


Additionally, the actor has a lot of difficulty aiming the weapon. It usually aims very high, and won't engage with the background weapon (if it's the only weapon available) at all. I'm not sure if this is an inherent problem with background weapons, or if it might be because I'm using fake arms to mount the weapons onto.

What am I doing wrong?


Tue Feb 25, 2014 1:00 am
Profile YIM WWW

Joined: Fri Sep 10, 2010 1:48 am
Posts: 666
Location: Halifax, Canada
Reply with quote
Post Re: [Help] Two-Legged Turrets
Try changing the weapon drop stuff to
Code:
if not self:HasObject("object name") then
    self:AddInventoryItem(CreateHDFirearm("Gun name", "Gunrte.rte"))
end

This'll make it so if the actor doesn't have the object it'll add one. This won't work for multiples of a weapon for that reason (it could with a bit more code) but otherwise it'll probably do what you want.
I'm not sure why the other one isn't working or if it ever did, it's been a while since I posted that haha


Tue Feb 25, 2014 1:10 am
Profile
User avatar

Joined: Mon Oct 22, 2012 4:09 am
Posts: 22
Location: Columbus, Ohio
Reply with quote
Post Re: [Help] Two-Legged Turrets
That got the weapon re-affixing itself, now I just need to figure out how to ensure it won't come back after being destroyed. I think I just might be able to jigger something up with some sharpness fiddling. Thanks!


Wed Feb 26, 2014 7:14 am
Profile YIM WWW
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.049s | 15 Queries | GZIP : Off ]