View unanswered posts | View active topics It is currently Wed Sep 26, 2018 8:01 am



Reply to topic  [ 9 posts ] 
 Homing Bullet Sprayer Template 
Author Message
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 10240
Location: Here
Reply with quote
Post Homing Bullet Sprayer Template
This is a template for a homing projectile and gun, and can be used with any gun that doesn't have self-propelling projectiles.
Everything you need to know in order to use this template is in the README included in the download.

Image

From the README:
When the device is off (default setting) the first object that the last projectile hits will be "marked."
When homing is turned on, all shots fired will home in on the marked object untill it is destroyed.
Toggle on/off homing mode by double tapping the Pie Menu button.

Attachment:
File comment: Please read the README
Homing Sprayer Template.rte.rar [33.3 KiB]
Downloaded 285 times


Fri Jun 11, 2010 5:15 am
Profile
User avatar

Joined: Fri Apr 30, 2010 2:12 pm
Posts: 560
Reply with quote
Post Re: Homing Bullet Sprayer Template
Wonderful scripted, thanks!
Did It lags when back-flipping?


Fri Jun 11, 2010 4:11 pm
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 10240
Location: Here
Reply with quote
Post Re: Homing Bullet Sprayer Template
What do you mean by "back-flipping?"


Fri Jun 11, 2010 6:27 pm
Profile
User avatar

Joined: Tue Mar 16, 2010 7:38 pm
Posts: 447
Location: The Ninth Circle
Reply with quote
Post Re: Homing Bullet Sprayer Template
Hey CaveCricket, is there any way to change the input key to switch between modes for the gun? I've had some problems with the pie-menu button for switching, and I wonder if it may be that I use a mouse/keyboard setup.
Anyway, regardless, it may be to the preference of others as well to change it to some other input method.


Fri Jun 11, 2010 8:06 pm
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 10240
Location: Here
Reply with quote
Post Re: Homing Bullet Sprayer Template
Well, what do you want it as? It's on the Pie Menu right now so it can be used with the duel weapons mode thing. If you want it on a specific keyboard key like letters/numbers, that would screw things up.


Fri Jun 11, 2010 8:40 pm
Profile
User avatar

Joined: Tue Mar 16, 2010 7:38 pm
Posts: 447
Location: The Ninth Circle
Reply with quote
Post Re: Homing Bullet Sprayer Template
Ahh. Right. Well, ♥♥♥♥. Guesss I'll just have to figure out how to get it to work well for me. Maybe I'm just dumb.... Heh. Well, regardless, it's impressive, and highly appreciated.


Fri Jun 11, 2010 9:26 pm
Profile
User avatar

Joined: Fri Apr 30, 2010 2:12 pm
Posts: 560
Reply with quote
Post Re: Homing Bullet Sprayer Template
CaveCricket48 wrote:
What do you mean by "back-flipping?"

I meant when the bullet does that looping for avoid the user, works really great.
I would prefer to use gold-dig key, because when I activate or desactivate it, sometimes I accidentally reload...


Fri Jun 11, 2010 9:43 pm
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 10240
Location: Here
Reply with quote
Post Re: Homing Bullet Sprayer Template
Oh. Heh, the "avoiding user" thing is completely accidental. It's not trying to avoid the user, it's just that it has a limit on how sharp it can turn.

For the Gold dig, it wasn't set on that so people can use this with the duel weapon mode template, but it's easily changable.

In "DevicePar.lua" change
Code:
         if self.taptimer:IsPastSimMS(self.taptime) then
            self.tapcounter = 0;
         elseif not(self.taptimer:IsPastSimMS(self.taptime)) then
            if self.tapcounter >= self.tapamount then

               if self.parentgun.Sharpness < 1000 then
                  self.parentgun.Sharpness = self.wepid + 1000;
                  self.soundfx = CreateAEmitter(self.soundonname);
                  self.soundfx.Pos = self.parent.Pos;
                  MovableMan:AddParticle(self.soundfx);
               else
                  self.parentgun.Sharpness = self.wepid;
                  self.soundfx = CreateAEmitter(self.soundoffname);
                  self.soundfx.Pos = self.parent.Pos;
                  MovableMan:AddParticle(self.soundfx);
               end
               self.tapcounter = 0;
            end
         end


to

Code:
         if self.lastgunvel == nil then
            self.lastgunvel = Vector(0,0);
         end
         if ToActor(self.parent).AIMode == Actor.AIMODE_GOLDDIG and Vector(self.parentgun.Vel.X,self.parentgun.Vel.Y) ~= Vector(self.lastgunvel.X,self.lastgunvel.Y) then
            ToActor(self.parent).AIMode = Actor.AIMODE_SENTRY;
            if self.parentgun.Sharpness < 1000 then
               self.parentgun.Sharpness = self.wepid + 1000;
               self.soundfx = CreateAEmitter(self.soundonname);
               self.soundfx.Pos = self.parent.Pos;
               MovableMan:AddParticle(self.soundfx);
            else
               self.parentgun.Sharpness = self.wepid;
               self.soundfx = CreateAEmitter(self.soundoffname);
               self.soundfx.Pos = self.parent.Pos;
               MovableMan:AddParticle(self.soundfx);
            end
         end
         if self.lastgunvel ~= nil then
            self.lastgunvel = Vector(self.parentgun.Vel.X,self.parentgun.Vel.Y);
         end


Fri Jun 11, 2010 9:55 pm
Profile
User avatar

Joined: Fri Apr 30, 2010 2:12 pm
Posts: 560
Reply with quote
Post Re: Homing Bullet Sprayer Template
Great, I'm really grateful :wink:
I'm very sure if crobotech would release someday in future, they will include this script somewhere.


Sat Jun 12, 2010 10:11 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 9 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.019s | 14 Queries | GZIP : Off ]