View unanswered posts | View active topics It is currently Wed Dec 11, 2024 1:09 pm



Reply to topic  [ 80 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next
 Simple Lua requests thread. 
Author Message

Joined: Sat Feb 03, 2007 7:11 pm
Posts: 1496
Reply with quote
Post 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
Profile WWW
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post 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
Profile
User avatar

Joined: Wed Dec 26, 2007 6:33 am
Posts: 1743
Location: Trapped in UCP. Send help.
Reply with quote
Post 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
Profile WWW
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Simple Lua requests thread.
ATTN: Typing into forums means that the tab key doesn't work.


Sat Aug 30, 2008 1:43 am
Profile
User avatar

Joined: Wed Dec 26, 2007 6:33 am
Posts: 1743
Location: Trapped in UCP. Send help.
Reply with quote
Post Re: Simple Lua requests thread.
Ctrl v still does.


Sat Aug 30, 2008 11:37 am
Profile WWW

Joined: Thu Jan 03, 2008 8:17 am
Posts: 24
Reply with quote
Post 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
Profile
User avatar

Joined: Tue Dec 12, 2006 3:10 pm
Posts: 495
Location: Uncertain quantum state
Reply with quote
Post 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 end


Blargh, be sure to add it on a UpdateActivity()


Sat Aug 30, 2008 9:53 pm
Profile

Joined: Sat Feb 03, 2007 7:11 pm
Posts: 1496
Reply with quote
Post 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
Profile WWW
User avatar

Joined: Sun May 18, 2008 8:30 am
Posts: 732
Reply with quote
Post 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
Profile

Joined: Sat Feb 03, 2007 7:11 pm
Posts: 1496
Reply with quote
Post Re: Simple Lua requests thread.
Too laggy, anyway, I figured it out.

Code:
Bleh.Lifetime = 1;


Sun Aug 31, 2008 4:26 am
Profile WWW
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Simple Lua requests thread.
RemoveActor() also works, I believe.


Sun Aug 31, 2008 4:32 am
Profile

Joined: Sat Feb 03, 2007 7:11 pm
Posts: 1496
Reply with quote
Post 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
Profile WWW

Joined: Fri Mar 16, 2007 1:28 pm
Posts: 328
Location: Finland
Reply with quote
Post 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
Profile

Joined: Sat Feb 03, 2007 7:11 pm
Posts: 1496
Reply with quote
Post 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
Profile WWW
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post 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
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 80 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next

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.026s | 14 Queries | GZIP : Off ]