I need help to move this statue in the correct tiles. in the picture shows #1 statue should be push in to the
circle that can seen in the picture and i just want the statue to be pull in specified areas. because when i try
to push the statue it goes everywhere as i push it in different directions. And i want to happend is the door
will be unlocked when you put the statues in the right places as u can see in the picture, sorry for bad
english. if you can help me with this one too it will be a big thanks because till now i don`t know how
to do this, thank you 🙂
The two images appear to be the same.
Are you saying you ONLY want to be able to push the statues along that path, and not anywhere else? Perhaps see if you can find Yanfly's Region Restrictions script for Ace. It won't help with pushing and pulling (there is a tutorial somewhere on how to do that), but I think it will be enough to force the statues to only follow the path you've set.
There's a secret trick if you want to make the statue only move along the path: place empty events around the path (since events can't go one on the other, unless you have "through on").
Both posts are true but while using events is certainly easier using regions seems far more efficient to me. It is not even that hard to achieve. If you want to do it without using scripts you can do with just events. Just set up your event so that it checks the region ID in the new position before moving and do nothing if the said ID is the wrong one.
EDIT: if you want to calculate the new coordinates on your own feel free to do it but I am quite sure you can use a script call to get them using built-in methods.
I am not going to provide the code itself since I do not have access to the engine right now and I do not want to mislead you (I am not confident I remember the method parameters properly). However the method itself is called round_x_with_direction (similarly for the y coordinate). The point here is use your player direction when pushing or its opposite (reverse_dir) when pulling.
If you are interested in those methods just check them in your script editor. If I am not mistaken they should be defined in the Game_Character class (or its super class Game_CharacterBase). This should narrow down your search.
If you make PC Game, just use the invisible Events on below Player. Simple, Easy and Efficient.
If you make Game for Mobile, than maybe use a more complicate solution with less Events, in case testplay on iphone uses to much performance.
I heard that you should not use more than 10 to 30per map on Iphone, not sure if that is true or not. On PC you can have 200+ Events without problems.
I don't think 16 empty events will have much impact on performance. It's the easiest and simplest solution, and won't have a noticeable performance hit.
What Theo said is true. And while on most computers 16 empty events are not an issue that cannot be said for slower ones (it is still not that noticeable though). Anyway adding 16 empty events in a map where there 13 events in total means increasing the number of those checks listed above by more than 100%.
Shortcuts are good and they ARE useful, but people should always learn to do things the right way. Once they know how to do them they can decide to take shortcuts.
That said I am 100% sure that map would lag on my old netbook the way it is right now, I don't even want to imagine how it could lag with another 16 events. XD
The best solution in general isn't always the best solution for every situations. If you're computer lags from only 16 events, I would suggest not playing RPG Maker games on it and get a new one. I agree that people shouldn't not do that if it takes like 100 events, but for each case there's a solution that takes into account performance vs implementation time.
It also depends on the person. A person who has never code, or even never used a script command would find that intimidating. I'm 100% with you if it's someone that doesn't find that solution intimidating.
I believe in this case we have a very simple task and somehow it ended up that we overthink this to much.
We got a Engine so the Game/Level designer can create the Gameplay, no need to wake the inner coder/scripter for alternate solutions.
Those could be implemented or researched in case the map lags on weak test pcs.
It doesnt matter if it uses 0.05% or5% of performace if the map consumes only a total of 10 to 20% of all performance reserves with all the efects and plugins and stuff, than i believe we overthink this. Because it runs smooth.
But its always helpful to point out different solution ways. But sometimes the easiest is the best.
As someone who has written an anti-lag script in VXAce, I'm very stingy to add more burden by adding unnecessary empty events. 16 events are already like adding 10% to 20% progress toward the starting of fps drops unless you're using my anti-lag. I feel like people nowadays are spoiled with how convenient the technology like how fast are the CPU, internet, and sizes that they don't even bother with the efficiency. If it doesn't work, buy a stronger device, etc.
I would say it again. Know both of the solutions. Always go to the best practice, or at least understand it. So, you know when not to use it for a specific case. If you're a teacher, you may always want to direct your student to use the best practice. Because they don't know. If they ended up knowing it, it's because they know.
However, ultimately it's up to the op to decide which solution they gonna take. And it's funny that the thread escalated much while there was no response at all from the op. Is it already solved? 😛