Through + player touch

Hey all


Having trouble having an event kill the player by touching it since it has through active (it needs this to pass over objects placed in its way) but this means it goes through the player to, and unless the player actively moves into the ghost, it will not activate the event, is there a way to maintain the through, and still cause an event on contact with the player? could this be done through variables of say event xy = player xy


Thanks


Jacob
I'd do it like this:

Spoiler
1DbHz1W.png
@Jake5555...


Here's a Map Event which you should be able to bend to your needs...

Spoiler
td7akOB.png



...My 'Madpie' is an NPC, flying over a Forest (and therefore 'Through'...), that (virtually...) swoops down to rob the Party if, by coincidence, their coordinates match; the thieving is done in the Common Event that's called. If you call a Common Event which kills off your Actor instead, job done..!


Des this help..?
Well I have no idea about the "ghost" stuff,but to make an event chase a player,set the event to "Event Touch" and on the move route thing,click "Custom" and do move towards player.So,when the event is there,it will automatically chase a player.


Edit:When I posted this,it didn't show any other posters for some reason,so I thought nobody had asked.Now,I see 2 other replies.Sorry...
@Jake5555 The engine cannot handle a touch trigger and through at the same time - for good reasons, because that would cause other problems if done that way.


So the only non-scripted solution would be a parallel process checking coordinates like @Dad3353's suggestion, but that event he displayed above has a big problem: it's adding a lot of processing to the lag limits. You need to add a wait(5) or wait(10) or so after the last END, because without a wait after everything, that parallel process runs sixty times per second. And nothing moves that fast to require sixty checks per second.
If you go with the Autonomous Moveroute handling the Moveroute, and the Eventpage on paralell, than i can share a Event Scriptline, to make your


Flames or whatever easier to copy paste.


if $game_map.events[@event_id].x == $game_player.x && $game_map.events[@event_id].y ==
$game_player.y ; wait(4); $game_self_switches[[$game_map.map_id,@event_id, 'A']] =
true end


And if the Moveroute for example goes Down Down Down Down Down, than you insert the following scriptline into autonomous moveroute after the move downs to reset your flame to its original position so it can start over again.


moveto(@event.x , @event.y)


Thisway you can copy paste your flame Event as often as you want and you have to change no variables or code.


Ah before i forget it, the Self switch A of the Event gets activated when it hits the player which activates the seccond eventpage of the flame event.
@Andar...


Good tip; I'd not thought of that (nor noticed a 'lag', to be fair...). I've 4 of these birds flying madly over the Map (based on the stock 'Lost Forest', so 60 x 60...). I'll add that 'Wait' straight away; cheers. 


R91KekF.gif
Carefull the wait could cause you to run through the enemies without getting hit when timed correctly, so you want them to be updated


often.


Ace Eventpage setting alleady seems to ad a few wait frames before repeating its eventpage, so there should be no need in adding extra wait.


or atleast test if one of them runs down in a straight line if you can skip through with the right timing while moving up and it down.
That's why I said "wait(5) or wait(10) or so" - the correct wait for any given map depends on what other events are on the map and has to be tested.


@Dad3353: lag is additive, but the engine has a buffer depending on the actual hardware running the events (because the FPS is capped and processing power above that cap can be used to prevent lag).


But as soon as that processing buffer is used up by too many parallel processes, the slowdown in FPS becomes detectable extremely fast.
Carefull the wait could cause you to run through the enemies without getting hit when timed correctly, so you want them to be updated


often.


Ace Eventpage setting alleady seems to ad a few wait frames before repeating its eventpage, so there should be no need in adding extra wait.


or atleast test if one of them runs down in a straight line if you can skip through with the right timing while moving up and it down.



The speed at which I play games, this is very unlikely to ever be a problem. 
gOib363.png
These particular Events on my Map are just Random, anyway, so not particularly critical, just an extra animation on the Map. Thanks for the 'heads up', though.
YEY7qB3.png
 

That's why I said "wait(5) or wait(10) or so" - the correct wait for any given map depends on what other events are on the map and has to be tested.


@Dad3353: lag is additive, but the engine has a buffer depending on the actual hardware running the events (because the FPS is capped and processing power above that cap can be used to prevent lag).


But as soon as that processing buffer is used up by too many parallel processes, the slowdown in FPS becomes detectable extremely fast.



I can easily try several different values and see if I can detect any difference. My Maps tend to be rather simplistic, with no, or few, gadgets, bells and whistles. I doubt in the few years left to me that I'll attain the efficiency and prowess of the 'pro' mappers and game designers, but it's always good to be aware, at least, of some of the potential pitfalls in this Dark Art. Thanks for the warning; I'll try to keep these precepts in mind. 
0VOmtFr.png
Yeah thats true, if he uses more than a few he needs a different solution.


With Events without Paralell Page, but one extra event on paralell which is handling collision detection for the for example 30 to 50 Flames or ghosts.


for a in (1..50) #<--Ghost Ids
if $game_map.events[a].x == $game_player.x && $game_map.events[a].y ==
$game_player.y ; wait(4); $game_self_switches[[$game_map.map_id,@event_id, 'A']] =
true end
end


Iam no Scripter and new to this myself, thats the reason why a share this , because others shared much of this to.
(based on the stock 'Lost Forest', so 60 x 60...)

...wait, what stock lost forest?
...wait, what stock lost forest?



You're new here, aren't you..? 
PZBcFmJ.png



RPG Maker MV is delivered with a whole series of pre-established Maps which one can 'Load' from the Map part of the Editor. I've not counted 'em, but there's more than a couple of dozen. They are an excellent head-start for anyone wishing to learn MV, and many of the Maps display techniques that can be very useful, such as 'looping', and different terrain heights. Differing styles, something for everyone. It seems that they are laughed at by 'experts', but I found them (and still find them...) source of inspiration and a solid basis for customisation and modifying. 
0VOmtFr.png
 
I didn't get these maps. Or at least I don't think I did.


Where can I find them?
@Waterguy everyone gets them, because they're an integral part of the editor - you can't "not" get them.


as said above, right-click into the map list window and select "load"
Interesting. I'll try them when my pc is back. Thanks.
@Waterguy...


Here's how I find 'em ...

Spoiler
bqH2kJx.png



 ...which brings up ...

Spoiler
VDTzePR.png



...'Lost Forest' can be found further down the list. I've no idea where these 'stock' Maps are stored; I think they're encrypted somewhere in the engine itself or something. I've never been able to find 'em; it would even be useful to add 'Template' Maps oneself, maybe..?. I thought everyone had them, although I know nothing of Steam, which could differ.
Why is this Thread MV now? I must have been tired yesterday, was sure to have read VX-Ace.


Thisway my Scriptsnippet solutions will not work, they are for Ruby.

Original thread: https://forums.rpgmakerweb.com/threads/through-player-touch.68646/