Creating a Monster

Talk about making games.

Creating a Monster

Postby ShingingDB » Sun Jun 03, 2007 3:33 am

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.
ShingingDB
 
Posts: 43
Joined: Sun Apr 01, 2007 1:31 am
Score: 0 Give a positive score

Re: Creating a Monster

Postby Sgt. Sparky » Sun Jun 03, 2007 5:10 am

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
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby Sgt. Sparky » Sun Jun 03, 2007 5:36 am

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:
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby ShingingDB » Sun Jun 03, 2007 5:52 pm

Thanks.

But how do I make the monsters spawn back at the same spot after 1 minute?
ShingingDB
 
Posts: 43
Joined: Sun Apr 01, 2007 1:31 am
Score: 0 Give a positive score

Postby Rux » Sun Jun 03, 2007 9:32 pm

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
I'm not good at coming up with signatures...
User avatar
Rux
 
Posts: 645
Joined: Sun Apr 29, 2007 9:26 pm
Location: Sitting on your moniter invisable.
Score: 35 Give a positive score

Postby Sgt. Sparky » Mon Jun 04, 2007 4:08 pm

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
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score


Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron