| Author | Message | 
        
			| CaveCricket48 
					Joined: Tue Jun 12, 2007 11:52 pm
 Posts: 13144
 Location: Here
   |   Homing Bullet Sprayer TemplateThis 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.  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.
 
 | 
		
			| Fri Jun 11, 2010 5:15 am | 
					
					   | 
	
	
		|  | 
	
			| Naxete 
					Joined: Fri Apr 30, 2010 2:12 pm
 Posts: 560
   |   Re: Homing Bullet Sprayer TemplateWonderful scripted, thanks!Did It lags when back-flipping?
 
 
 | 
		
			| Fri Jun 11, 2010 4:11 pm | 
					
					   | 
	
	
		|  | 
	
			| CaveCricket48 
					Joined: Tue Jun 12, 2007 11:52 pm
 Posts: 13144
 Location: Here
   |   Re: Homing Bullet Sprayer TemplateWhat do you mean by "back-flipping?" 
 
 | 
		
			| Fri Jun 11, 2010 6:27 pm | 
					
					   | 
	
	
		|  | 
	
			| Nocifer 
					Joined: Tue Mar 16, 2010 7:38 pm
 Posts: 447
 Location: The Ninth Circle
   |   Re: Homing Bullet Sprayer TemplateHey 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 | 
					
					   | 
	
	
		|  | 
	
			| CaveCricket48 
					Joined: Tue Jun 12, 2007 11:52 pm
 Posts: 13144
 Location: Here
   |   Re: Homing Bullet Sprayer TemplateWell, 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 | 
					
					   | 
	
	
		|  | 
	
			| Nocifer 
					Joined: Tue Mar 16, 2010 7:38 pm
 Posts: 447
 Location: The Ninth Circle
   |   Re: Homing Bullet Sprayer TemplateAhh. 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 | 
					
					   | 
	
	
		|  | 
	
			| Naxete 
					Joined: Fri Apr 30, 2010 2:12 pm
 Posts: 560
   |   Re: Homing Bullet Sprayer TemplateCaveCricket48 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 | 
					
					   | 
	
	
		|  | 
	
			| CaveCricket48 
					Joined: Tue Jun 12, 2007 11:52 pm
 Posts: 13144
 Location: Here
   |   Re: Homing Bullet Sprayer TemplateOh. 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) thenself.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 thenself.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 | 
					
					   | 
	
	
		|  | 
	
			| Naxete 
					Joined: Fri Apr 30, 2010 2:12 pm
 Posts: 560
   |   Re: Homing Bullet Sprayer TemplateGreat, I'm really grateful     I'm very sure if crobotech would release someday in future, they will include this script somewhere.
 
 | 
		
			| Sat Jun 12, 2010 10:11 am | 
					
					   | 
	
	
		|  | 
	
	
		|  |