Author |
Message |
CrazyMLC
Joined: Fri Dec 22, 2006 4:20 am Posts: 4772 Location: Good news everyone!
|
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 |
|
|
Duh102
happy carebear mom
Joined: Tue Mar 04, 2008 1:40 am Posts: 7096 Location: b8bbd5
|
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 |
|
|
CrazyMLC
Joined: Fri Dec 22, 2006 4:20 am Posts: 4772 Location: Good news everyone!
|
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 |
|
|
Gotcha!
Joined: Tue Apr 01, 2008 4:49 pm Posts: 1972 Location: The Netherlands
|
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 |
|
|
Lizardheim
DRL Developer
Joined: Fri May 15, 2009 10:29 am Posts: 4107 Location: Russia
|
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 |
|
|
CrazyMLC
Joined: Fri Dec 22, 2006 4:20 am Posts: 4772 Location: Good news everyone!
|
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 |
|
|
Lizardheim
DRL Developer
Joined: Fri May 15, 2009 10:29 am Posts: 4107 Location: Russia
|
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 |
|
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
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 |
|
|
PhantomAGN
Joined: Mon Jun 29, 2009 2:40 am Posts: 610 Location: Deep below The Map of Mars
|
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 |
|
|
|