Hi. In my game, I have a ghost event that I want to patrol around a set route, and damage the player on contact.
When it damages the player, I don't want it to stop, I want it to pass through the player and continue on it's way. (Also it should be going through some other events, without interacting with them.)
So I set the ghost events trigger to event touch, and give the ghost event the "Through" option, and it passes right through the player without trigger the event. I messed around with event priority a bit but couldn't get it to trigger while going through the player (and other events). Anything I can do here? I searched a bit for solutions but didn't find much.
Hi. In my game, I have a ghost event that I want to patrol around a set route, and damage the player on contact.
When it damages the player, I don't want it to stop, I want it to pass through the player and continue on it's way. (Also it should be going through some other events, without interacting with them.)
So I set the ghost events trigger to event touch, and give the ghost event the "Through" option, and it passes right through the player without trigger the event. I messed around with event priority a bit but couldn't get it to trigger while going through the player (and other events). Anything I can do here? I searched a bit for solutions but didn't find much.
bad idea, don't use parallels unless needed because they have too high a risk of lag or timing errors.
@Leah Prime
the easiest way would be to have the event being through only temporary where needed, not permanently on through.
However there is something that you haven't realised yet.
Any trigger of contact with the player resets the move route to the beginning.
Which means that the ghost will leave the move route at that moment unless you do something special.
One solution is to add a pathfinding plugin and have the move route be using the path sccript to find the way to start and end of the patrol zone.
As for the damage commands, they need to be triggered on contact. the event then has to use a set move route command containing through ON, one or two steps forward and then through off, and use a script command to find the path back to the original route again after that.
It is trickier than a single ghost on parallel (that would have been my preference for single ghost as well) but the only way to handle multiple ghosts on a single map. Because the parallel process for a dozen ghosts would cause some lag...
The easiest way is to simply rework the collisions for instances of events with certain metadata so that it works with through and doesnt reset the moveroute.
It is trickier than a single ghost on parallel (that would have been my preference for single ghost as well) but the only way to handle multiple ghosts on a single map. Because the parallel process for a dozen ghosts would cause some lag...
how about the reverse check... check game player coordinate does it have any ghost event on it?
... so it's could be only one conditional check... we don't need to check all the ghost event... but if there's one at the player coordinate... it won't be causing any lag at all...
we can use
Code:
$gameMap.eventsXy($gamePlayer.x, $gamePlayer.y)
to check any event on player coordinate or not...
we need to know it's the 'ghost event' or not though...
EDIT: create a parallel event and add conditional branch with this script as condition...
then do something if true there (damaging the party etc)
don't forget to name the ghost event with 'ghost' included in it. (doesn't have to be case sensitive).
using this parallel event also did not trigger actual the 'ghost' event... so the ghost event actually did not reset it's move route. (in theory) .
not exactly.
some people might refer you to scripts that can do this (and they will work), but in my opinion that is usually bad planning and should be avoided.
Depending on what exactly you want to do you should either use a regular switch if the intention is to control some other event, or reorganise the event that only an event itself controls its self-switches.
I admit that it might seem better to some people to do this with script commands instead, but using scripts for such overrides will make later bughunting if something went wrong much more problematic. And I suspect that difficulties in bughunting is one of the bigger reasons why so many projects get abandoned.
So I think it would be better to show screenshots of your current events and tell us what should happen ingame, then we can tell you how to do this correctly.
So I think it would be better to show screenshots of your current events and tell us what should happen ingame, then we can tell you how to do this correctly.
I havn't decided exactly what should happen yet, but the vague plan is that if a ghost brings the main character to 0 HP, then I want to be able to manipulate it in some way. (Probably do something like make it posses the player, not entirely sure yet, but It's probably going to involve some eventing and manipulating it's move route at the very least.) I was going to turn on the self switch of the event I wanted so I could potentially manipulate it's move route (I suppose an alternative would be to set a variable to the id of the correct ghost, and then manipulate it's move route from there, but there's no way to choose which event to manipulate the move route of based on a variable)
The events themselves are pretty barebones so there's not much point posting screenshots. There's nothing going on I havn't explained yet (I'm just making sure what I want to do is possible before I start filling in details)
may i know first what you want to happen when the selfswitch A ON? do you want the ghost to disappear after hit? if yes... do you want it removed permanently or when you reenter the map the ghost respawn back? cause it need different appoach
the problem with the parallel method above is it will still detecting the ghost even when you switch pages to empty page since it read ghost event name at player location... so if you flip the selfswitch A and your player step on the invisible event. the conditional branch will execute.
it can modified though... it might need one more script call to actually activate the event page (the damaging party event command moved to the ghost actual event page. the self switch flip also on the event page too)
and depending on your answer above... modify the event page second page(one with selfswitch A on) to move the event out of player reach. (one time ghost) or not using selfswitch and erase the event (reusable ghost).
i'm currently typing on my phone though... when i back at home i will post again with the script call.
I havn't decided exactly what should happen yet, but the vague plan is that if a ghost brings the main character to 0 HP, then I want to be able to manipulate it in some way. (Probably do something like make it posses the player, not entirely sure yet, but It's probably going to involve some eventing and manipulating it's move route at the very least.) I was going to turn on the self switch of the event I wanted so I could potentially manipulate it's move route (I suppose an alternative would be to set a variable to the id of the correct ghost, and then manipulate it's move route from there, but there's no way to choose which event to manipulate the move route of based on a variable)
The events themselves are pretty barebones so there's not much point posting screenshots. There's nothing going on I havn't explained yet (I'm just making sure what I want to do is possible before I start filling in details)
sorry... i just read this... apparently when i type my post above... you and andar post before i send my post .
btw this is the script call:
Code:
var ev = $gameMap.eventsXy($gamePlayer.x, $gamePlayer.y)[0];
if (!$gameMap.isEventRunning()) ev.start();
ev.updateRoutineMove()
put it inside the conditional branch earlier like this:
do not add any event command anymore there...
move the event command for your damaging party scene inside the ghost event page instead.
there's a catch though... the ghost will look like it passed through the actor.
since the event will repeatedly execute if you're not moving it from player x,y immediately >.<. (infinite loop).
if that above not acceptable for you... then a proper plugin would be required instead of this method.
other than that catch above... all the ghost event page should work just fine btw...
also... i read your example mock scenario above... (when actor 1 hp = 0 possess).
there's a problem in that setting... the problem is with game over triggering when all party member dead...
(so if you only have actor 1 and he's dead... game over).
and you cannot have HP = 0 if you did not allow event command death when reducing hp. it will alway HP = 1.
to bypass that you can add conditional branch BEFORE the hp reducing event...
that check the actor hp does it below your ghost damage... if yes do the possesing thingy...
(btw just realize that there's no option to check actor hp... so need another conditional script again >.<)
to check actor 1 hp below or equal to 1000
Code:
$gameActors.actor(1).hp <= 1000;
if you want to chect first party slot actor then
Code:
$gameParty.members()[0].hp <= 1000;
so the example event page is like this:
but basically it's all about eventing technique on what you want to happen.
Thanks! I managed to adapt your event code into something workable, though updating the movement route caused the event to jump, so I removed that and it seemed to work fine. (I already solved the actor hp = 0 issue a while ago, using pretty much the solution you outlined. Though it is possible to get the actors HP with events by setting it to a variable.)
Thanks! I managed to adapt your event code into something workable, though updating the movement route caused the event to jump, so I removed that and it seemed to work fine. (I already solved the actor hp = 0 issue a while ago, using pretty much the solution you outlined. Though it is possible to get the actors HP with events by setting it to a variable.)
ah yes... that might works in your situation... self switch A = on + wait + self switch A = off is making it have 'delay'
and since the ghost event not activated... it will be able to move out of player way before the next 'tick' conditional check...
and dividing the damage part in the parallel while the posses/ghost kill in the ghost event also make it works...
glad it work out well for you...
but maybe you need to do some more testing to make sure there's no strange behavior on the events .
Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.