Line of sight and real-time combat

Okay, so I'm wanting to make a sort of stealth/action game but can't for the life of me understand any tutorial I've found online!  I don't know the first thing about scripts, nor can I figure out how to actually use the "Get Location Info" technique (I vaguely understand what it's supposed to do).  In the interest of keeping it simple for you guys though, here is exactly what I want to do when it comes to line of sight:


I have a guard standing at 008,006 who goes from looking up to looking down and repeats.  I'm wanting to make it so that:


1.  Whenever the player steps on 008,009 while the guard is looking down (toward this location), he gets busted instantly.


2.  Even when the player is already standing at 008,009 and the guard turns to look down, he gets busted instantly.


3.  Naturally, I want the player to be able to move around freely.


Also, I want to know the best (preferably simplest) way to make real-time (melee) combat work.  You can give me a script perhaps, if I just tell you what the player is called and what the event (enemy) is called?


We'll call the player Player and enemy Enemy, just to keep things as simple as possible!  Lol.  And if I need to name any other events or whatever, just let me know!


And please, please, PLEASE don't direct me to a tutorial or other thread unless you're supremely confident it's simple enough for a noob like me to understand!  Thank you in advance for responding.
I dont have real help for you but here is an older Steam Workshop example of how to use the Get Location Info Eventcommand


with one example in the Project. Maybe that  helps with Question 1.


http://steamcommunity.com/sharedfiles/filedetails/?id=586265136


You explained one good way to make static line of sight for some puzzles.


I dont have a easy Tutorial for your other Question.


But i played around with such stuff years ago and now i connected stuff from 3 short test projects together.


I was testing bullet stuff, but i made a melee out of the bullet. It uses Events no scripts in scripteditor but there is a scriptequivalent script in one of the events


which handles hit detection. Its not nearly finished but you can test if the kind of gameplay is what you are looking for.


Shooter Testmap 100Enemies


Shooter Testmap 200 Enemies


Melee  Testmap 100 Enemies


1Enemie has 3HP


Space button for Gun


http://www.file-upload.net/download-11601954/GamefilewithoutRTP.exe.html
I dont have real help for you but here is an older Steam Workshop example of how to use the Get Location Info Eventcommand


with one example in the Project. Maybe that  helps with Question 1.


http://steamcommunity.com/sharedfiles/filedetails/?id=586265136


You explained one good way to make static line of sight for some puzzles.


I dont have a easy Tutorial for your other Question.


But i played around with such stuff years ago and now i connected stuff from 3 short test projects together.


I was testing bullet stuff, but i made a melee out of the bullet. It uses Events no scripts in scripteditor but there is a scriptequivalent script in one of the events


which handles hit detection. Its not nearly finished but you can test if the kind of gameplay is what you are looking for.


Shooter Testmap 100Enemies


Shooter Testmap 200 Enemies


Melee  Testmap 100 Enemies


1Enemie has 3HP


Space button for Gun


http://www.file-upload.net/download-11601954/GamefilewithoutRTP.exe.html

Yeah, my Steam account is messed up so I can't download the first one, and I can't figure out what to do about the real-time combat.  You don't remember what you did in either case?  What would you do if you were trying to do what I described in the first question?
The seccond Link is to a File Hoster and Contains the Shooter/Melee Demo that one should work.


And here i uploaded the Workshopproject for you. You just need the RTP on your PC.


And after Testing i saw its surely not what you were looking for.


http://www.file-upload.net/download-11602181/GetLocationInfo.exe.html


My thoughts for the first Question:


I googled and found this with Pictures which explain different solutions or possibilities of Evented Line of sight with and without use of some scriptcommands within the events.
Well I appreciate the effort you've put in trying to help me.  I've already gone through that tutorial and it loses me really quickly, though.  That's why I was hoping someone could just give me a script or explain things in layman's terms using the details I gave about what I'm trying to do.  I'm shocked that a truly simple tutorial is so hard to find in the first place, but it is what it is.
Our efort would be wasted cause we dont know where to pick u up from.


Use the tutorial pick yourself one possible way of the explained ones in that tutorial, than ask a specific question about something you dont understand


or needing help with.


Than we can offer specific Help or assistence. Try to imagine iam you and you are me, how would you aproach to Help the other Person? 🙂
For real time combat, be advised that it is really hard to do in ACE (and currently impossible in MV, as the plug-ins are not made yet for that). All we got are a couple ABS scripts and they are not noob friendly at all. But, to go that route search for ABS scripts, as that is the common name for it (assuming you mean battles occur on the map. If not, clarify with detail what battle system you want). Prepare to spend hours trying to learn the script. Plus, most of them overwrite so many default functions that  any solution for the guard will probably no longer work, forcing you to find another route.


If  you want real time combat, I'd get that implemented first, as it will affect how to handle the guard situation more than likely. Just my advice.
Our efort would be wasted cause we dont know where to pick u up from.


Use the tutorial pick yourself one possible way of the explained ones in that tutorial, than ask a specific question about something you dont understand


or needing help with.


Than we can offer specific Help or assistence. Try to imagine iam you and you are me, how would you aproach to Help the other Person? 🙂

Well I don't know, because I don't know how to make it happen.  But if I did, I'd name the player and event as described, do it, and explain how I did it step by step.

For real time combat, be advised that it is really hard to do in ACE (and currently impossible in MV, as the plug-ins are not made yet for that). All we got are a couple ABS scripts and they are not noob friendly at all. But, to go that route search for ABS scripts, as that is the common name for it (assuming you mean battles occur on the map. If not, clarify with detail what battle system you want). Prepare to spend hours trying to learn the script. Plus, most of them overwrite so many default functions that  any solution for the guard will probably no longer work, forcing you to find another route.


If  you want real time combat, I'd get that implemented first, as it will affect how to handle the guard situation more than likely. Just my advice.

We can forget about real-time combat, actually.  I might just want a stealth game.  I originally thought there could be a way to sort of... Idk, "refresh" the game's detection of the player at the location?  Because I had it to where the player would be detected if he walked into the line of sight while the guard was already looking his way, but I could still get to the location, have the guard turn around and be staring at me without it registering (because I was using a "Player Touch" trigger, I guess).


The last thing I tried is a bit silly, but I made a few invisible events that showed up and sped along a route that would be the guard's line of sight.  Only problem was that, to make it do anything once they touched the player, they had to be the same "Priority" as the player, which of course hindered the player's movement breaking the whole illusion of it being the guard that had caught him.
I think your last approach would work, if you made the events below player/player touch. I have noticed there is an occasional miss when doing it that way, but it worked pretty well in my experience.
I think your last approach would work, if you made the events below player/player touch. I have noticed there is an occasional miss when doing it that way, but it worked pretty well in my experience.

Yeah, it misses way too often for me.  I just can't help but feel like there's a much better way, and I had assumed most people who use this program a lot would know it 🙁
@Vic 2.0 If you need help with a tutorial - any tutorial - then the only way to get this help is explaining to us what you did when your worked through that tutorial (reading it is never enough, you have to do everything in the same way in a test project), and when your test project suddenly behaved differently than the descriptions of the tutorial.


That said, I have a suspicion that part of your problem is the nomenclature - that you don't understand some parts of the tutorial because you misinterpreted the words.


For example, no one around the RM community talks about "real time combat" - there are effectively three completely different combat types that could all be called "real time" (and have been called such), so we use other names to differ between the combat scripts needed - we call them either "action battle scripts" (combat on map and without pauses), "ATB/CTB" (not on map, but not with battleturns but timed counting during battlescreen) or tactical battle systems (on map, but usually turn-based with several units per side).


If you're unsure about the very basics, you can follow the link to the starting point in my signature. Otherwise either ask specific questions in the tutorial topic or (if the tutorial is not on this site) link to it and ask those questions in a new topic here. Just make sure that they are specific, like "I followed the instructions to line XY, but when it said I have to do Z I don't see that in the program"
Hmm....maybe one simple example helps towards the correct direction, sorry for too much chineese in the previous posts of mine.


But i thought you understood the basics after reading your first post. realy not sure with what you are struggling.


Edit: I read your first post example 1... 2... 3.... like you allready acomplished that mechanic, but you are asking for it?


Sorry iam not native english it wasnt my atention to derail the topic towards wrong direction. Could you please clearify.


And one example not sure if helpfull.


Pseudo Code:


Enemy is Facing down


if yes


 control variable1 = this event or event ids  map x


control variable1 sub player map x


conditional branch variable1 equals 0


if yes


control variable1 this event or event ids  map y


control variable1 sub player map y


conditional branch variable1 equals or is more than 0


conditional branch variable1 equals or is less than 5 (5Tiles is the view distance of the enemy towards this direction)


if yes


textbox, hi you how did you sneak in here...
Okay, how bout this?  I've figured out that (for some reason) the event that hits the player resulting in him being detected functions a lot worse when its graphic is "None" (as it needs to be, obviously).  When I use a graphic for it in testing just to see where it's going exactly, it works fine.  So my new question is simply, how can I make a graphic that looks like "None" but doesn't register in the program as that?  I think if I can come up with an invisible graphic, this will help a great deal.


So does anyone know how to do that?  Or better yet, have one I can download?
I've figured out that (for some reason) the event that hits the player resulting in him being detected functions a lot worse when its graphic is "None" (as it needs to be, obviously). 

That should not be the case, and if that really happens that means that something is interfering with that - instead of searching for a workaround, you should try to find out why that happens, because often such errors will have other consequences as well.


Please give us a screenshot of that event, then we can see what you did wrong - most probably a parallel process with wrong timing or something like that.
That should not be the case, and if that really happens that means that something is interfering with that - instead of searching for a workaround, you should try to find out why that happens, because often such errors will have other consequences as well.


Please give us a screenshot of that event, then we can see what you did wrong - most probably a parallel process with wrong timing or something like that.

That's just how much of a noob I am, I can't even figure out how to take a screenshot (Yes, I've looked it up and tried what the different places said; nothing).  But I can tell you the Condition is for Switch 0001 to be ON.  Switch 0001 is named "Guard 1", and it's ON whenever the guard is facing down (toward the player).


The event's route is Custom, moving up three times and down three times (back and forth).  It's at the highest Speed and Frequency so as to actually hit the player before he can just skip by.  Priority is Below Characters and the Trigger is Event Touch (which works just as well if not better than Player Touch, I've already checked).


All of this works like a charm if the graphic is set to something other than "None" for some weird reason.  If you need any more information, let me know!
Okay, I think I just came up with a solution.  I have my line of sight conundrum fixed (I think).


I'm going to try to simply upload my game to the site. 'Beginning' and 'Act I, Scene I' are the two maps I'm working with.


That's assuming I can even do this correctly, and one of you can load it up on your computer to check it out.


View attachment Game.ini


View attachment Game.rvproj2


ETA: I didn't know for sure which file to upload, so I uploaded these two.
That's just how much of a noob I am, I can't even figure out how to take a screenshot (Yes, I've looked it up and tried what the different places said; nothing).

1) you open the event window you want to show us


2) you press [alt]-[prtscreen] on your keyboard (only [Prtscrn] would also work, but for the entire desktop instead of only the window)


3) you open your image program (MS Paint if you have nothing else)


4) you press [ctrl]-[V] (or use the insert function of your program


5) you save the resulting picture (possibly after adding markers)


6) you upload the picture somewhere and link it here (you can use attachments here, but have only limited space for them

ETA: I didn't know for sure which file to upload, so I uploaded these two.

Both of those files are useless as they contain no part of the game, only basic configuration data.


you'll need to compress a game archive in the menu function and upload that to share your game.


And


Vic 2.0, please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.


If you have to add something and your own post is the last, simply edit it.
Yeah, Print Screen doesn't do anything, with or without pressing either Ctrl or the Windows key.


I'll see about compressing a game archive later.
Yeah, Print Screen doesn't do anything, with or without pressing either Ctrl or the Windows key.

wrong - printscreen does nothing visible but it will store the data in memory. You NEED the following steps in the image program to make the screenshot visible.


If not, then your windows is damaged (or your keyboard), because that is the basic function of that key for every windows.
you might have to paste it onto paint - most windows has it - and save the file.

Original thread: https://forums.rpgmakerweb.com/threads/line-of-sight-and-real-time-combat.62226/