this one is so easy to code, basically, the event is like this a crazy scientist offers his services for a cost, he will improve you station (add an upgrade). but there's a chance he will fail and damage the station so its a gamble.
basicly the way you code this is : go to event manger, inside do_event add an if:
if(action.equals("crazy_inventor")) {}
inside that, if ask the player using ui (user input object) if he agrees to the deal.
if he does create a random number to determine if the upgrade was a success or not.
reduce the players credits (he will pay these wether the upgrade succeeds or fails, the cost is low so its tempting).
if success add a random upgrade (a basic upgrade) and tell the player the event succeed.
if fail, do damage to the station (when station damage is implemented, you can leave it empty or leave a comment "damage here"), output a message telling the player the event failed.
it looks harder then it really is, look at if(action.equals("smuglers_sell")) for inspiration. or just ask me about this issue.
this one is so easy to code, basically, the event is like this a crazy scientist offers his services for a cost, he will improve you station (add an upgrade). but there's a chance he will fail and damage the station so its a gamble.
basicly the way you code this is : go to event manger, inside do_event add an if:
if(action.equals("crazy_inventor")) {}
inside that, if ask the player using ui (user input object) if he agrees to the deal.
if he does create a random number to determine if the upgrade was a success or not.
reduce the players credits (he will pay these wether the upgrade succeeds or fails, the cost is low so its tempting).
if success add a random upgrade (a basic upgrade) and tell the player the event succeed.
if fail, do damage to the station (when station damage is implemented, you can leave it empty or leave a comment "damage here"), output a message telling the player the event failed.
it looks harder then it really is, look at
if(action.equals("smuglers_sell"))
for inspiration. or just ask me about this issue.