View unanswered posts | View active topics It is currently Sun Jan 12, 2025 5:39 am



Reply to topic  [ 24 posts ]  Go to page Previous  1, 2
 Order dropship @ 750 oz, get 250 back when returned. 
Author Message
User avatar

Joined: Fri Dec 22, 2006 4:20 am
Posts: 4772
Location: Good news everyone!
Reply with quote
Post Re: Order dropship @ 750 oz, get 250 back when returned.
Ah, I think I understand now.

Couldn't you just make the dropship cost 250, and make the mech subtract 500 on creation?
Code:
function Create(self)
   self.CurrentF = ActivityMan:GetActivity():GetTeamFunds(self.Team);
   ActivityMan:GetActivity():SetTeamFunds(self.CurrentF - 500, self.Team);
end


You could also avoid lua altogether and just give the delivery ship 33 starting hp.


Last edited by CrazyMLC on Sun Apr 04, 2010 11:17 pm, edited 1 time in total.



Sun Apr 04, 2010 11:14 pm
Profile WWW
happy carebear mom
User avatar

Joined: Tue Mar 04, 2008 1:40 am
Posts: 7096
Location: b8bbd5
Reply with quote
Post Re: Order dropship @ 750 oz, get 250 back when returned.
CC's solution is still better, though I wonder... Would changing the gold cost work better? I've never tried it to see if you get a different gold amount on return.


Sun Apr 04, 2010 11:16 pm
Profile
User avatar

Joined: Fri Dec 22, 2006 4:20 am
Posts: 4772
Location: Good news everyone!
Reply with quote
Post Re: Order dropship @ 750 oz, get 250 back when returned.
Ah, just saw Cave's solution. Probably best.


Can't change GoldValue.
Code:
ERROR: the attribute 'ACDropShip.GoldValue' is read only


Sun Apr 04, 2010 11:19 pm
Profile WWW
User avatar

Joined: Tue Apr 01, 2008 4:49 pm
Posts: 1972
Location: The Netherlands
Reply with quote
Post Re: Order dropship @ 750 oz, get 250 back when returned.
Thanks, all, for thinking with me. I'll try your script as a final try, CrazyMLC.
It will undoubtly allow players to have -250 oz, but I guess UniTec can give loans once in a while.

CaveCricket's solution is probably the best, but I am afraid that after the dropship gibs into this new dropship the new dropship won't deliver its cargo and just hovers about.


Sun Apr 04, 2010 11:48 pm
Profile
DRL Developer
DRL Developer

Joined: Fri May 15, 2009 10:29 am
Posts: 4107
Location: Russia
Reply with quote
Post Re: Order dropship @ 750 oz, get 250 back when returned.
Just have it go to a certain altitude then open doors, then return. With Lua ofc.


Sun Apr 04, 2010 11:53 pm
Profile
User avatar

Joined: Fri Dec 22, 2006 4:20 am
Posts: 4772
Location: Good news everyone!
Reply with quote
Post Re: Order dropship @ 750 oz, get 250 back when returned.
Oops.
Code:
function Create(self)
   self.CurrentF = ActivityMan:GetActivity():GetTeamFunds(self.Team);
   if self.CurrentF > 499 then
      ActivityMan:GetActivity():SetTeamFunds(self.CurrentF - 500, self.Team);
   else
      print("Not enough funds!");
      self.ToDelete() = true;
   end
end




You could probably fix that with AIModes.


Last edited by CrazyMLC on Mon Apr 05, 2010 12:41 am, edited 1 time in total.



Sun Apr 04, 2010 11:55 pm
Profile WWW
DRL Developer
DRL Developer

Joined: Fri May 15, 2009 10:29 am
Posts: 4107
Location: Russia
Reply with quote
Post Re: Order dropship @ 750 oz, get 250 back when returned.
So you loose 250oz when you don't have enough?


Mon Apr 05, 2010 12:07 am
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: Order dropship @ 750 oz, get 250 back when returned.
CrazyMLC wrote:
Ah, just saw Cave's solution. Probably best.


Can't change GoldValue.
Code:
ERROR: the attribute 'ACDropShip.GoldValue' is read only


The lua property is Goldcost (with that capitalization) but I don't see how that'd make any difference.

Just have your script spam Controller.MOVE_UP when the second dropship spawns. Easy, quick, effective.


Mon Apr 05, 2010 2:05 am
Profile
User avatar

Joined: Mon Jun 29, 2009 2:40 am
Posts: 610
Location: Deep below The Map of Mars
Reply with quote
Post Re: Order dropship @ 750 oz, get 250 back when returned.
Why tell it to be moved if you can set it to having a vertical velocity?

Is the current method this?
Buy expensive ship with nothing in it, replace with cheaper ship with mech in it?


Mon Apr 05, 2010 4:50 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 24 posts ]  Go to page Previous  1, 2

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