GHOST GAME?
Posts
Pages:
1
My game is puzzle themed, and there's this part which when the player enters, there are ghosts wandering, and if a ghost sees the player, she will die. How do I do this? Do I need a script for this? How do I do the code. This is not a problem, it's a tutorial.
Dude, it's been, what? A little over an hour? Give it time. At least a few days before complaining.
There are many different time zones on the site and you just happened to ask at a time where not many people are on. Patience is a virtue for a reason.
Also, it's against site rules to multipost. If you need to add more information then just hit the Edit button under your post and include the information in that post. As for bumps, only after 2-3 days are they allowed. You won't get a warning for this, but keep it in mind for the future, okay?
Now, as to your question, there are a few ways to do this. I don't know what your skill level is in the program, however, or even what program you're using (we have little choices when you make a topic that lets you tag it for an engine for a reason, but failing that, adding it to your initial post is a good idea).
If you're using Ace or VX or XP, there are bound to be scripts out there that allow you to do proximity checking, but you can also event this kind of system.
The easiest way is if the ghosts are stationary or have a set route (say back and forth in one direction). You'd have events in the areas the ghosts can look and if the ghost looks in that direction you'd turn on a switch (or use a variable number) to indicate that. Said switch/variable number would activate events in the line of sight and if the hero is standing on it, kill the hero. This can be a bit buggy, though.
A far better way is to use the check hero location method by using variables.
Now, you need to know how to use variables in the first place so unless you do, there's not much use in me telling you atm. See why this is important information to include in your post?
There are many different time zones on the site and you just happened to ask at a time where not many people are on. Patience is a virtue for a reason.
Also, it's against site rules to multipost. If you need to add more information then just hit the Edit button under your post and include the information in that post. As for bumps, only after 2-3 days are they allowed. You won't get a warning for this, but keep it in mind for the future, okay?
Now, as to your question, there are a few ways to do this. I don't know what your skill level is in the program, however, or even what program you're using (we have little choices when you make a topic that lets you tag it for an engine for a reason, but failing that, adding it to your initial post is a good idea).
If you're using Ace or VX or XP, there are bound to be scripts out there that allow you to do proximity checking, but you can also event this kind of system.
The easiest way is if the ghosts are stationary or have a set route (say back and forth in one direction). You'd have events in the areas the ghosts can look and if the ghost looks in that direction you'd turn on a switch (or use a variable number) to indicate that. Said switch/variable number would activate events in the line of sight and if the hero is standing on it, kill the hero. This can be a bit buggy, though.
A far better way is to use the check hero location method by using variables.
Now, you need to know how to use variables in the first place so unless you do, there's not much use in me telling you atm. See why this is important information to include in your post?
Pages:
1














