Charas-Project

Game Creation => Requests => Tutorials => Topic started by: neb87 on March 14, 2007, 08:53:27 PM

Title: Ghost
Post by: neb87 on March 14, 2007, 08:53:27 PM
Is it possible to make a monster(charset)
Run at you when you are not facing it
and run away from you when you are facing it.
example- The Ghost on Mario
Title:
Post by: Archem on March 14, 2007, 09:03:02 PM
Yes.
Title:
Post by: thepsynergist on March 14, 2007, 09:04:06 PM
lol
Title:
Post by: neb87 on March 14, 2007, 09:04:35 PM
ok so how?
Title:
Post by: Bluhman on March 14, 2007, 09:37:23 PM
First, you need a Parallel process that charts which way the hero is facing. Next, you need your boo, or ghost, depending on what you want to call it.

Now, in the parallel process event, put two more variable setters which record where the ghost is located on the map. Using fork conditions in the event, check whether the ghost is in the heroes visibility, which should be a cone, which I don't know how to do, so you can assume it could be a column instead. Either way, if the fork condition turns out to be true for the hero staring at the ghost, turn on a switch, which will cause the ghost to back away in fear.

I'm not all that cut up for programming, so you might want to ask somebody of more prestige.
Title:
Post by: neb87 on March 15, 2007, 05:08:14 AM
Ok it's working sort of
The boo will go after me if I am not looking at it
but when I do look at it it will go back and fourth in a area of 2 squares

Heres the Code
Common Event-Parallel Process-Trigger Switch:0080 (on)
Photo Sharing and Video Hosting at Photobucket
Photo Sharing and Video Hosting at Photobucket
Photo Sharing and Video Hosting at Photobucket
Photo Sharing and Video Hosting at Photobucket
Photo Sharing and Video Hosting at Photobucket
Photo Sharing and Video Hosting at Photobucket
END

Photo Sharing and Video Hosting at Photobucket

Photo Sharing and Video Hosting at Photobucket

Title:
Post by: Dominicy on March 15, 2007, 05:47:35 AM
with how you have it the ghost will go slower and slower and slower when your watching him.  just change the page speed to one less.
Title:
Post by: neb87 on March 15, 2007, 05:52:25 AM
Quote
Originally posted by Dominicy
with how you have it the ghost will go slower and slower and slower when your watching him.  just change the page speed to one less.

ok that fixed the speed but the
when you look at it it will go back and fourth bug
still in a effect
Title:
Post by: MrMister on March 15, 2007, 06:13:14 AM
The Mario ghosts don't run away when you look at them, they turn away and stop.
Title:
Post by: Bluhman on March 15, 2007, 07:07:06 PM
Quote
Originally posted by MrMister
The Mario ghosts don't run away when you look at them, they turn away and stop.


Yeah, I know. It'd just be slightly more unique if the ghost slowly backed away instead of stopping in place.

But either way, it seems that the ghost is staying still when Neb's character looks at it.