hmm. this is harder than i thought...
heres a tutorial i found for external code:
This code will load external code and turn it into objects, to see the
code in the objects, look at "Code.txt"
Example created by Coolist with Game Maker 8 Registered
//Open a text file
//Set array id varible
//Loop untill we break from the loop
//Load the code from the text file to a temporary variable
//Check to see what event type it is and delete the keyword
//Set the event type (0=Create) and load the code
//Set the event type (1=Step) and load the code
//Add to our array ID only if the last event has been loaded
//Go to next line
//Check to see if we've reached the end
//If we have, break from the loop
//Close the text file
//Set a new temporary varible j and start a loop
for (j=0; j<i; j+=1;)
//Create a new object
//Add a create event to the object with our loaded create text
global.obj[j] is our object ID, ev_create is the event type (Create Event)
the event number is 0 becuase it is the Create Event, and the last string
is the code which we loaded from the text file.
//Add a step event to the object with our loaded step text
global.obj[j] is our object ID, ev_step is the event type (Step Event)
the event number is ev_step_normal becuase it is the normal Step Event,
and the last string is the code which we loaded from the text file.
//Give the object a sprite to see it
//Create the instance of object global.obj[j] in the middle of the room