View Single Post
  #35  
Old 09-24-2011, 11:42 AM
Mington Mington is offline
Approved Member
 
Join Date: Apr 2008
Posts: 29
Default

Lovely to see things looking up

How to construct an AirfieldEmergency script from first principles while explaining the steps, that's what I'd like to see. A concrete example with commentary that's fairly simple (if the detecting of the damaged plane crossing the AlarmRadius can be done)

There's almost 800 references to Maddox functions, classes, methods and wotnot so I'm imagining that it's on

There's the introductory part to a script, where databases of functions, subroutines (BASIC/Visual Basic) we will need access to in the running script, these might be-

using System;
using System.Collections.Generic;
using maddox.game;
using maddox.game.world;
using maddox.GP;

The script then begins and it's at this point that we pupils need statements commented please. We can figure out what each line of code means but it's like examining atoms without knowing about the Table of Elements. We can see that they're all different and they all must mean something, there must be some rhyme to it, we are not idiots

'We need this line to see if any planes are already in the mission' (the mission designer created an unknown number of planes)

'We need this line to step through each plane to see if it is damaged' (all planes in all running missions can be checked)

'This line instantiates/spawns a plane/vehicle at this XYZ position' (if the position is clear)

This scripter's commentary gives us a chance to ask the scriptwriter a sensible question... it's very difficult to ask sensible questions without a handle to hang the question on. For example how can you tell if a possible spawning position is clear of obstructions. But that's another story probably

Ming
Reply With Quote