Increasing a player's credits
Moderators: winston, another_commander
Increasing a player's credits
I'm sure there is a method for increasing a player's credits (at the end of a successful mission, for example), but I can't find the function that does it on the wiki. Maybe I am just overlooking it. Can anyone help?
Re: Increasing a player's credits
player.credits = 100000000;
- Diziet Sma
- ---- E L I T E ----
- Posts: 6312
- Joined: Mon Apr 06, 2009 12:20 pm
- Location: Aboard the Pitviper S.E. "Blackwidow"
Re: Increasing a player's credits
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
Re: Increasing a player's credits
True. The question was to increase, not set. I'll do better next time .Diziet Sma wrote: ↑Mon Mar 27, 2017 12:49 pm
Re: Increasing a player's credits
I was looking on that page but I guess I overlooked it. Guess I thought there would be a player.increaseCredits(1000) or something like that. But player.credits=player.credits+1000 makes sense, too.hoqllnq wrote: ↑Mon Mar 27, 2017 12:18 pm
Thanks for the replies everyone! I apreciate your help.
Re: Increasing a player's credits
Does the += operator work in Oolite javascript? For example,
I know it works in a lot of languages. Regular javascript even has, i do believe. So what about Oolite Javascript?
Code: Select all
player.credits+=1000;
-
- Quite Grand Sub-Admiral
- Posts: 6683
- Joined: Wed Feb 28, 2007 7:54 am
- Prester John
- Competent
- Posts: 56
- Joined: Mon Sep 17, 2018 5:57 am
Re: Increasing a player's credits
*hem* ... or install this little 'cheat.oxp'.....
*hides in shame*
*hides in shame*