View unanswered posts | View active topics It is currently Thu Dec 12, 2024 1:27 am



Reply to topic  [ 34 posts ]  Go to page Previous  1, 2, 3
 Quick Lua Tips 
Author Message
User avatar

Joined: Fri May 11, 2007 4:30 pm
Posts: 1040
Location: England
Reply with quote
Post Re: Quick Lua Tips
you still have to specify what group you want in movable man ("for actors in MovableMan do")... you can't just have "for MovableMan do"


Sun Nov 16, 2008 7:20 pm
Profile
User avatar

Joined: Fri Apr 27, 2007 4:55 pm
Posts: 1178
Location: America!
Reply with quote
Post Re: Quick Lua Tips
The "actors" in that line of code is a variable. It can be named anything you want. It's just storing the value that the "MovableMan" function is returning each time the for loop goes through it. You could just as easily use

Code:
for thing in MovableMan do


Sun Nov 16, 2008 7:39 pm
Profile
DRL Developer
DRL Developer
User avatar

Joined: Wed Dec 13, 2006 5:27 am
Posts: 3138
Location: A little south and a lot west of Moscow
Reply with quote
Post Re: Quick Lua Tips
Exactly. That means that the variable is very simply a container, if you will.
Now here's a weird one. The Clones don't seem to much, UNLESS you GibThis() them.
Then, there's an explosion behind the actor.
Also, if you change their position, their position changes. They're not visible, but if you gib them, it happens there.


Sun Nov 16, 2008 9:19 pm
Profile WWW
User avatar

Joined: Tue Dec 12, 2006 3:10 pm
Posts: 495
Location: Uncertain quantum state
Reply with quote
Post Re: Quick Lua Tips
I experiemented with the Clone function,
assinging a variable to the clone and moving around etc.
It works ok except that control isn't witched, so even if you switch to another actor the clone will keep receiving commands.


Mon Nov 17, 2008 1:45 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 34 posts ]  Go to page Previous  1, 2, 3

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