For variables, it's all dependent on whether you want local (object specific) or global (shared) variables. Both are declared the same.
Say you're making an RPG... Every character in your party is going to have different health, yes? So lets say in our party we have 3 characters, Healy, Stabby, and Castro.
You can either do it though the character's creation event:
Max_HP=30; HP=30;
or through another object:
Healy.Max_HP=30; Healy.HP=30;
For global variables (say you want the team's strength to progress in unison)
Then it's as simple as
global.Max_HP=30; global.HP=30;
and have the characters read from those variables (i.e. Healy.HP=global.HP)
When I'm coding, I'm not really neat so I can't really help you 100% here, but when I'm deciding on whether to use scripts, or make everything object-based it all depends on how many times I'm going to be using the script, and how many objects are going to be acting in that manner. If I write a movement script that only effects the player, naturally I'll just write it in the object itself. But if I'm writing a shooting script that has variable projectiles, and velocities and will be used by many monsters, I'll use a script.
ARGUMENTS FOR THE WIN!
Much like variables, strings are declared via the x=y formula. Game Maker 6-7 also have very extensive functions for string manipulation so making text engines in it is a breeze! As for the basics, say you want a character to spout off 2 random sayings (in popup menu)
in the NPC's create event:
saying[0]="Welcome to Plainsville.";
saying[1]="W... Welcome to Plainsville.";
and in whatever event you decide to trigger this
my_saying=saying[floor(random(2))];
show_message("Townie: "+string(my_saying));
And for added fun, you could mix variables into this, and add a bit of sarcasm to your NPC's
greeted=false;
saying0="Welcome to Plainsville.";
saying1="...Didn't I welcome you already?";
and
if greeted=false { show_message("Townie: "+string(saying0)); greeted=true;}
else { show_message("Townie: "+string(saying1)); }
So after being warmly greeted by the NPC, suddenly he coldly brushes you off as a tourist
If you want a GMK of any of these in action, let me know! :]