Charas-Project
Game Creation => Requests => Tutorials => Topic started 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
-
Yes.
-
lol
-
ok so how?
-
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.
-
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)






END


-
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.
-
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
-
The Mario ghosts don't run away when you look at them, they turn away and stop.
-
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.