View unanswered posts | View active topics It is currently Fri Dec 27, 2024 8:05 am



Reply to topic  [ 8 posts ] 
 active round limiting / dud rounds 
Author Message
User avatar

Joined: Tue Jan 12, 2010 8:25 pm
Posts: 400
Location: mukilteo, wa
Reply with quote
Post active round limiting / dud rounds
I made a gun (using some of CaveCricket48's needler with permission) that fires bullets that stick and can be remotely detonated by pressing (F).

what I would like to do is two things, make it switch stuck rounds that are too close to the gun with duds (I've made a custom one in the ini) and, only allow around 80 rounds to be stuck and undetonated at a time (plays empty click) to reduce lag from having way too many stuck at once.

Would adding a ray to check the distance of the round create a lot of lag?

Any help you guys can offer is much appreciated. :P


Attachments:
NewGun.rte.rar [404.26 KiB]
Downloaded 157 times
Wed Aug 25, 2010 8:32 pm
Profile
DRL Developer
DRL Developer

Joined: Fri May 15, 2009 10:29 am
Posts: 4107
Location: Russia
Reply with quote
Post Re: active round limiting / dud rounds
Has refferences to needler.rte.


Wed Aug 25, 2010 9:31 pm
Profile
User avatar

Joined: Tue Jan 12, 2010 8:25 pm
Posts: 400
Location: mukilteo, wa
Reply with quote
Post Re: active round limiting / dud rounds
Oops sorry I'll fix that after work. Thanks lizard


Wed Aug 25, 2010 9:34 pm
Profile
User avatar

Joined: Sat Jun 19, 2010 5:02 pm
Posts: 331
Location: Mekkan
Reply with quote
Post Re: active round limiting / dud rounds
You could create an obstacle ray just fine. Just make it skip like 5 pixels each time.


Sun Sep 05, 2010 10:46 pm
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: active round limiting / dud rounds
you don't need a ray to check proximity

just use sceneman:shortestdistance once every 2-3 seconds on each bullet

then have each bullet add itself to the same table you're using to explode them, and have a global manager particle that checks the count of the list, and replace + update the list


Mon Sep 06, 2010 1:16 am
Profile
User avatar

Joined: Tue Jan 12, 2010 8:25 pm
Posts: 400
Location: mukilteo, wa
Reply with quote
Post Re: active round limiting / dud rounds
Grif do you have a mock up of what that code might look like?

I haven't reached the chapter on tables yet.

CaveCricket48 helped me out a whole bunch with the script, but if i can get these two things to work it will greatly reduce potenial lag and unintended self suicides.

*edit* sorry i haven't posted a new version of this yet, i'm at work but will likely add it sunday.


Fri Sep 10, 2010 4:17 am
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: active round limiting / dud rounds
I have a tutorial here that has a quick guide on tables.


Fri Sep 10, 2010 4:53 am
Profile
User avatar

Joined: Tue Jan 12, 2010 8:25 pm
Posts: 400
Location: mukilteo, wa
Reply with quote
Post Re: active round limiting / dud rounds
thank you CC48


Fri Sep 10, 2010 5:08 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 8 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.077s | 15 Queries | GZIP : Off ]