Page 1 of 1

Creating a Monster

PostPosted: Sun Jun 03, 2007 3:33 am
by ShingingDB
How do I create a monster where in the game, the monster just spawns or appear anywhere in the map, but has to spawn onto a platform. Then when the monster spawns, it can move either right, stop right, left, and stop left. It can move anywhere on the platform, and not go off of the platform.

I'm thinking of a Path event, BUT I DONT WANT TO MAKE A PATH FOR EVERY SINGLE MONSTER.

Re: Creating a Monster

PostPosted: Sun Jun 03, 2007 5:10 am
by Sgt. Sparky
ShingingDB wrote:How do I create a monster where in the game, the monster just spawns or appear anywhere in the map, but has to spawn onto a platform. Then when the monster spawns, it can move either right, stop right, left, and stop left. It can move anywhere on the platform, and not go off of the platform.

I'm thinking of a Path event, BUT I DONT WANT TO MAKE A PATH FOR EVERY SINGLE MONSTER.

I will make a demo real quick. :D

PostPosted: Sun Jun 03, 2007 5:36 am
by Sgt. Sparky
Here is the link:
http://game-editor.com/forum/viewtopic. ... 0680#20680
:D
(Sorry it took so long, my internet Froze when I tried to post it. :( )

EDIT: I Had To Repost it Because it Froze Completely! :cry:

PostPosted: Sun Jun 03, 2007 5:52 pm
by ShingingDB
Thanks.

But how do I make the monsters spawn back at the same spot after 1 minute?

PostPosted: Sun Jun 03, 2007 9:32 pm
by Rux
Easy. Go to the monster's actor control. Then
add a create actor event then create timer. Name the timer and set the duration to 60000.
Then add a timer event and select the timer you made, and select the action create actor. Select the monster to create and set the monster's coordinates.
Add that and then it should work. Note: If there is more than one type of enemy you have to do all these steps again for that actor. :D

PostPosted: Mon Jun 04, 2007 4:08 pm
by Sgt. Sparky
Rux wrote:Easy. Go to the monster's actor control. Then
add a create actor event then create timer. Name the timer and set the duration to 60000.
Then add a timer event and select the timer you made, and select the action create actor. Select the monster to create and set the monster's coordinates.
Add that and then it should work. Note: If there is more than one type of enemy you have to do all these steps again for that actor. :D

That will not work :( (if the Actor is Destroyed)
make a Spawn Point Actor(Call it SpawnPoint, make it just a normal Actor),
set the create at Startup to No,
then make it create the Timer with the Duration of 60000 on the create Actor event(when Rux Said with the Creating on the timer event of that Timer.)
and on the create Actor Event of the Monster use this Code,
Code: Select all
int i, hit;
//also make a variable(string) called NAME
for(i = 0; i < ActorCount("SpawnPoint"); i++)
{
    sprintf(NAME, "SpawnPoint.%d", i);
    if(distance(x, y, getclone(NAME)->x, getclone(NAME)->y) < 50)hit = 1;
}
if(hit == 0)//put the create Actor->SpawnPoint Code Here.

:D