View unanswered posts | View active topics It is currently Thu Dec 26, 2024 4:25 am



Reply to topic  [ 4 posts ] 
 Forcing the AI to go full auto [SOLVED] 
Author Message

Joined: Fri Jul 06, 2012 7:20 am
Posts: 44
Reply with quote
Post Forcing the AI to go full auto [SOLVED]
I have a script that reloads a gun (instantly) between the first few shots to enable the ability to change the magazine of the gun.

The gun works perfectly well as intended, until you let an AI try to shoot it.

The AI simply fires the first shot repeatedly at the lowest fire rate available. Is there any way to get the AI to actually do the equivalent of holding down the trigger even through reloads?

Would it be possible to attach such an AI change to a gun?

More reasonably, is there a way to change the magazine without reloading?

I've included the relevant code here for your perusal if you care to.


Last edited by Visage on Wed Jun 10, 2015 9:26 am, edited 1 time in total.



Tue Jun 09, 2015 11:44 am
Profile
User avatar

Joined: Sun Jan 28, 2007 10:32 pm
Posts: 1609
Location: UK
Reply with quote
Post Re: Forcing the AI to go full auto
You're probably better off using a dummy mag+ammo and spawning the projectiles as a function of the script itself. That way the AI should behave itself and you don't need to do weird stuff with reloading.


Tue Jun 09, 2015 1:43 pm
Profile YIM

Joined: Fri Jul 06, 2012 7:20 am
Posts: 44
Reply with quote
Post Re: Forcing the AI to go full auto
Thanks.

After derping around a bit, I managed to get it to work, so I think I'll mark it as solved.

On a related note, though, how do I credit Lua stolen from vanilla content?


Wed Jun 10, 2015 9:25 am
Profile
DRL Developer
DRL Developer
User avatar

Joined: Wed Dec 13, 2006 5:27 am
Posts: 3138
Location: A little south and a lot west of Moscow
Reply with quote
Post Re: Forcing the AI to go full auto [SOLVED]
You could include a comment that says what file it came from.
Personally I've never really cared if people steal my scripts from vanilla content, though like 95% of the Lua scripts in the game probably aren't mine anymore, so take that with a grain of salt.


Thu Jun 11, 2015 8:04 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 4 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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.111s | 15 Queries | GZIP : Off ]