Arrays scripting tutorial (Page 3 of 5)

Written by Roguey,

Arrays scripting tutorial, written by Roguey


Sending a message

We know how many ships the Argon Government has and made up a message in msg, we need to send it to the player. To do this we must use another command called send incoming message. So head back to <New Line> and press enter. Now select Audio commands, then add this command to our script:

send incoming message <Var/String> to player: display it=<Var/Number>

We be asked for Script Input after we add this command, so select msg under Available Variables. So now we should be back at our script with <Var/Number> selected. This has two options, true or false. This parameter makes this message either pop-ups (if true), or just report to the players log (if false). So press enter and choose TRUE under constants. Your script should look like this:

Our Count.Ships script, so far

Our script is ready to be saved and ran. So press escape and say yes. Now run the script (find Count.Ship, press r and press enter twice). As soon as your script gets ran, you should recieve a message from an unknown source, telling you how many Argon ships there are, like so:

Our Count.Ships script, so far

Your game might have a more or less ships, however it gives you a general idea how many Argon ships are floating around in space. This is great and that, but how about working out how much this lot costs to build?

Next: Adding worth
<< Previous Page - Next Page >>