View unanswered posts | View active topics It is currently Fri Apr 26, 2024 7:57 am



Reply to topic  [ 2 posts ] 
 Having 2 functions in one actor? 
Author Message
User avatar

Joined: Mon Feb 12, 2007 12:46 am
Posts: 1765
Location: ..............
Reply with quote
Post Having 2 functions in one actor?
How would you go about doing this?

Say I want to use Grif's teleporting code and Erahgon's Telekenesis at the same time.
How would you go about doing that?


Fri May 22, 2009 9:31 pm
Profile
User avatar

Joined: Fri Jan 26, 2007 3:22 am
Posts: 1451
Reply with quote
Post Re: Having 2 functions in one actor?
Roy-G-Biv wrote:
How would you go about doing this?

Say I want to use Grif's teleporting code and Erahgon's Telekenesis at the same time.
How would you go about doing that?


Copy and paste? Or you could be organized and make them their own functions, and simply call the function from update.

Here's an example I did using luaguns' vortex. The first two functions are actually separated into a base file, and vortex.lua just has

dofile("luaguns.rte/Guns/vortbase.lua")

at the top.

http://luabin.foszor.com/2026

It's just organization. It'd be nice if people did this, so their base files could be included in other mods etc rather than snipping code and being sloppy.


Fri May 22, 2009 9:37 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.077s | 17 Queries | GZIP : Off ]