View unanswered posts | View active topics It is currently Fri Dec 27, 2024 10:20 am



Reply to topic  [ 7 posts ] 
 Simple script request, with reward! 
Author Message
User avatar

Joined: Tue Mar 20, 2007 10:16 am
Posts: 186
Location: Australia
Reply with quote
Post Simple script request, with reward!
I need someone who knows lua to whittle up a small script for a mod I'm making. It's to be entered in the mod contest, and if the mod wins, you will get all of the prizes won.

What I want the script to be able to do is pick one of 4 random crafts when purchasing one particular craft.
Or more/less simply:
To be able to pick a number out of 4, spawn the corresponding craft and move the first craft's inventory into it.

How I had envisioned it would work is:

1. Upon spawning the craft, a random number out of 4 is generated.
2. Depending on the number, 1 of 4 different craft types will be created at the position of the first craft.
3. The inventory of the first craft, its actors and their weapons, are copied into the second craft.
4. The first craft is removed.

If there's a better method, feel free to do it how you want.

All of the assets needed for the mod have been made (all but one craft, and some tweaks).

This mod is intended for entry in the mod contest, so if you undertake this please try to get it done before the submission end time, the 13th. Don't forget that if this mod wins you'll get both of the prizes :D


Sorry if I'm a little vague, I don't want to give too much away about the mod.


Sun Oct 10, 2010 1:40 am
Profile
User avatar

Joined: Tue Dec 12, 2006 3:10 pm
Posts: 495
Location: Uncertain quantum state
Reply with quote
Post Re: Simple script request, with reward!
Are the crafts going to differ from eachother in function, or require animation?

If not, just set it's frame to 0-3 upon Create()


Sun Oct 10, 2010 11:56 am
Profile
User avatar

Joined: Tue Mar 20, 2007 10:16 am
Posts: 186
Location: Australia
Reply with quote
Post Re: Simple script request, with reward!
They differ in function, alot.


Sun Oct 10, 2010 4:11 pm
Profile
User avatar

Joined: Sat Oct 17, 2009 2:07 pm
Posts: 127
Reply with quote
Post Re: Simple script request, with reward!
Here's random craft script.
But it still not copy inventory, because I'm not sure about inventory methods and functions.
You need more experienced scripter for that.


Attachments:
1.rar [254 Bytes]
Downloaded 171 times
Mon Oct 11, 2010 2:22 pm
Profile ICQ
User avatar

Joined: Tue Mar 20, 2007 10:16 am
Posts: 186
Location: Australia
Reply with quote
Post Re: Simple script request, with reward!
Mad Alex wrote:
Here's random craft script.
But it still not copy inventory, because I'm not sure about inventory methods and functions.
You need more experienced scripter for that.

It works, but the created craft act like my retards, there's no health and I have no control over them.


Tue Oct 12, 2010 6:11 am
Profile
User avatar

Joined: Sat Oct 17, 2009 2:07 pm
Posts: 127
Reply with quote
Post Re: Simple script request, with reward!
Hm...
I didn't remember, probably I added team copying after uploading.
Or it's just don't work for some reason.
Try downloading this.


Attachments:
1.rar [254 Bytes]
Downloaded 193 times
Tue Oct 12, 2010 1:22 pm
Profile ICQ
User avatar

Joined: Tue Mar 20, 2007 10:16 am
Posts: 186
Location: Australia
Reply with quote
Post Re: Simple script request, with reward!
Mad Alex wrote:
Hm...
I didn't remember, probably I added team copying after uploading.
Or it's just don't work for some reason.
Try downloading this.

Their team is copied, but I think this is an issue out of our control, because even though they are certainly on the same team, they have no health indicator and can't be selected. This problem seems to appear with any 'created' actors. It shouldn't be too much of an issue, as long as any actors in the rockets don't suffer from the same problem.

Just a crazy idea I had, there's no chance that any lua functions exist that can control buy orders are there?


Wed Oct 13, 2010 6:54 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 7 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.098s | 14 Queries | GZIP : Off ]