So I've done some action scripting (Flash), but not C++.
I see some stuff thats done the same way, but for the most part, I'm just confused.
So what I tried to make, was that when you walk in an area, a zombie spawns and walks into a door and then disappears.
I've gotten to the part that it spawns (I just place it down, but I'm not sure how to spawn it), and that it walks to the desired node I made.
The grunt automatically disappears as it should, so thats good
void OnStart()
{
GiveItemFromFile("lantern", "lantern.ent");
for(int i=0;i<10;i++) GiveItemFromFile("tinderbox_"+i, "tinderbox.ent");
}
void OnEnter()
{
AddEntityCollideCallback("Player", "scaretrigger", "scareactivate", true, 1);
AddEnemyPatrolNode("scaremonster", "scaremonsterpath1", 0, "");
}
void OnLeave()
{
}
I started out with the basic starting code, or however it was called
I'm going to delete the code of the tinderboxes and lantern later on when I'm going to do some actual play-testing.
I understand the code of the starting items a bit, except "int i=0;i<10;i++". What do the ";" mean in C++?
"scaretrigger" = the area I made in which it triggers. I've used the Area tool with the Script option...
"scareactivate" = the boolean that is created? If someone would explain this to me, I'd be gratefull.
"scaremonster" = the grunt, who is activated in the map editor.
"scaremonsterpath1" = the node where scaremonster walks to.
What I need now, is a way to trigger the monster to spawn and walk to "scaremonsterpath1".
I've searched through the forum, but I didnt get a real proper explaination of how it actually works. This might also be because I'm a real newbie to C++ though.
I've got the script functions from the wikipedia.
From what I've seen and done up to now, I understand that "string& asXXXX" is basically the name of an object/function?
Thanks in advance.