| Author | Message | 
        
			| zalo 
					Joined: Sat Feb 03, 2007 7:11 pm
 Posts: 1496
   |   Re: Simple Lua requests thread.Now can you do it so it only works when it is in an area? 
 
 | 
		
			| Fri Aug 29, 2008 12:22 am | 
					
					     | 
	
	
		|  | 
	
			| Grif REAL AMERICAN HERO 
					Joined: Sat Jan 27, 2007 10:25 pm
 Posts: 5655
   |   Re: Simple Lua requests thread.for actor in MovableMan.Actors do[tab]if SceneMan.Scene:WithinArea("Win Zone", actor.Pos)
 [t][t]if actor.ClassName == ACRocket then
 [t][t][t]actor.Vel = 0
 [t][t]end
 
 [t][t]if actor.ClassName == ACDropship then
 [t][t][t]actor.Vel = 0
 [t][t]end
 [t]end
 end
 
 
 | 
		
			| Fri Aug 29, 2008 12:31 am | 
					
					   | 
	
	
		|  | 
	
			| Ophanim 
					Joined: Wed Dec 26, 2007 6:33 am
 Posts: 1743
 Location: Trapped in UCP. Send help.
   |   Re: Simple Lua requests thread.Grif wrote: for actor in MovableMan.Actors do[tab]if SceneMan.Scene:WithinArea("Win Zone", actor.Pos)
 [t][t]if actor.ClassName == ACRocket then
 [t][t][t]actor.Vel = 0
 [t][t]end
 
 [t][t]if actor.ClassName == ACDropship then
 [t][t][t]actor.Vel = 0
 [t][t]end
 [t]end
 end
Code:    ATTN:Code tags preserve tabs.
 That is all
 
 | 
		
			| Fri Aug 29, 2008 3:28 am | 
					
					     | 
	
	
		|  | 
	
			| Grif REAL AMERICAN HERO 
					Joined: Sat Jan 27, 2007 10:25 pm
 Posts: 5655
   |   Re: Simple Lua requests thread.ATTN: Typing into forums means that the tab key doesn't work. 
 
 | 
		
			| Sat Aug 30, 2008 1:43 am | 
					
					   | 
	
	
		|  | 
	
			| Ophanim 
					Joined: Wed Dec 26, 2007 6:33 am
 Posts: 1743
 Location: Trapped in UCP. Send help.
   |   Re: Simple Lua requests thread.Ctrl v still does. 
 
 | 
		
			| Sat Aug 30, 2008 11:37 am | 
					
					     | 
	
	
		|  | 
	
			| Silver 
					Joined: Thu Jan 03, 2008 8:17 am
 Posts: 24
   |   Re: Simple Lua requests thread.What would be the code to make any loose Particles and MOSRotatings in an area accelerate leftward?
 
 And is it possible to make the backround autoscroll yet?
 
 
 | 
		
			| Sat Aug 30, 2008 9:32 pm | 
					
					   | 
	
	
		|  | 
	
			| findude 
					Joined: Tue Dec 12, 2006 3:10 pm
 Posts: 495
 Location: Uncertain quantum state
   |   Re: Simple Lua requests thread.Well this should work, bash the code if doesn't. Code: for particle in MovableMan.Particles do if SceneMan.Scene:WithinArea("Left Zone", particle.Pos) then particle.Vel = Vector(-30,particle.Vel.Y) end endBlargh, be sure to add it on a UpdateActivity()
 
 | 
		
			| Sat Aug 30, 2008 9:53 pm | 
					
					   | 
	
	
		|  | 
	
			| zalo 
					Joined: Sat Feb 03, 2007 7:11 pm
 Posts: 1496
   |   Re: Simple Lua requests thread.What would be the action I use for deleting things?
 Like Bleh:GibThis but without the mess. (It also doesn't work on particles)
 
 
 | 
		
			| Sun Aug 31, 2008 4:07 am | 
					
					     | 
	
	
		|  | 
	
			| CandleJack 
					Joined: Sun May 18, 2008 8:30 am
 Posts: 732
   |   Re: Simple Lua requests thread.Make the actor's velocity so high that it phases through the ground. 
 
 | 
		
			| Sun Aug 31, 2008 4:21 am | 
					
					   | 
	
	
		|  | 
	
			| zalo 
					Joined: Sat Feb 03, 2007 7:11 pm
 Posts: 1496
   |   Re: Simple Lua requests thread.Too laggy, anyway, I figured it out.
 
 | 
		
			| Sun Aug 31, 2008 4:26 am | 
					
					     | 
	
	
		|  | 
	
			| Grif REAL AMERICAN HERO 
					Joined: Sat Jan 27, 2007 10:25 pm
 Posts: 5655
   |   Re: Simple Lua requests thread.RemoveActor() also works, I believe. 
 
 | 
		
			| Sun Aug 31, 2008 4:32 am | 
					
					   | 
	
	
		|  | 
	
			| zalo 
					Joined: Sat Feb 03, 2007 7:11 pm
 Posts: 1496
   |   Re: Simple Lua requests thread.How do I check if an actor has something in his inventory when he enters an area? (A grenade, to be specific.)
 And how do I set a ship's AIMode to Return?
 
 
 | 
		
			| Mon Sep 01, 2008 11:01 pm | 
					
					     | 
	
	
		|  | 
	
			| AtomicTroop 
					Joined: Fri Mar 16, 2007 1:28 pm
 Posts: 328
 Location: Finland
   |   Re: Simple Lua requests thread.I need a way to get the degree between two vectors. (actor and predetermined vector or area)For example, aimangle from actor to brain.
 
 
 | 
		
			| Tue Sep 02, 2008 3:38 pm | 
					
					   | 
	
	
		|  | 
	
			| zalo 
					Joined: Sat Feb 03, 2007 7:11 pm
 Posts: 1496
   |   Re: Simple Lua requests thread.I also need a way to find out how many of a certain instance name are in the game at once. 
 
 | 
		
			| Tue Sep 02, 2008 11:14 pm | 
					
					     | 
	
	
		|  | 
	
			| Grif REAL AMERICAN HERO 
					Joined: Sat Jan 27, 2007 10:25 pm
 Posts: 5655
   |   Re: Simple Lua requests thread.AtomicTroop wrote: I need a way to get the degree between two vectors. (actor and predetermined vector or area)For example, aimangle from actor to brain.
That's something that I'm like 95% sure is impossible with current Lua functionality.
 
 | 
		
			| Wed Sep 03, 2008 1:04 am | 
					
					   | 
	
	
		|  | 
	
	
		|  |