Help - Search - Members - Calendar
Full Version: [RGSS]Event is facing?
RPG RPG Revolution Forums > Scripting > Script Development and Support > Script Requests
Redd
Is there a little scriplet someone could make that checks which direction the current event is facing? So that I can use it in a Conditional Branch?
I'm trying to make a "stealth kill" system (along with the Stealth/Detection Script) that makes it so that if you sneak up from behind someone you can use your equipped weapon to kill them sneakily. Problem is, there's only a "Player is facing" condition in Conditional Branch.
So what I'm asking for is, a script call that would determine which way the current event is facing (up, down, left, or right) so that you could assassinate them.

Credits will be given smile.gif Thanks!
X-M-O
What if you set the "character being assassinated" event to have a switch that if the player is within a certain area on the map that the event will detect the player?
If the event/character being assassinated is always in the same spot or always looking the same way, then you only need to detect if the player is in any location that would be a place where the event could detect the player.

If that makes sense.
Redd
The guard looks in different directions and some of them move though, so that would be quite cumbersome.
I could do variables, but I would have to have a different variable for each guard and that would not end up a happy time.
stripe103
Don't know if you still need it, but I think you can do
CODE
$game_map.events[event id].direction

and it should return the direction. 2 for down, 4 for left, 6 for right and 8 for up.
Should be usable in an event.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.