Hello
I have managed to make a eventing system and with using event copy from other map plugin my players can deploy bombs that destroys objects in the tiles nearby.
I did this by making a switch. "Bomb deployed: on". and when that switch is setup on all the "bombable" events on the map does a check to see if they are touched by event "bomb", while the event "bomb" is taking a quick walk in a smal circle around its original position.
This works great for me. But its not as good as I want it to be yet.
problem 1. with all the events on the map checking for positions the engine gets quite laggy while the processes is going
question: Is there a more sufficient/smarter way to do checks like this?
If we are talking about static bombable Objects and not moving npc, than you can use this:
Eventcommand - Page3 - Get Location Info - Event ID on X,Y. If you dont layer multiple Events on one maptile, than this is very
efective to find out which event is on that position. Than for example another condition, if event id between 10 and 23 its one of the bombable events, do stuff.... boom.
Thatway you just got 1 Event with moving bomb which checks 9times and thats it. your other events dont need to check anything in this scenario.
There are a few other solutions for this depending on the details.
if each events run on a parallel process and checks for position inside the event, than probably,
but you can make 1 common event that is constantly checking for teh player X, Y.
also possible for checking the bombs if using a common event and 1 switch that checks those position
for you in 1 parallel process.
The Code only need to run 1 Time when needed, and that should be when the Bomb Item is used from Inventory,
with Eventcommand (call) "Common Event".
If he uses a button press for bomb placement, than yes that parallel event needs to handle it.
Thanks! Yes it is a buttonpress deploying the current equiped weapon effect.
And the events checking for being next to a bomb are imported via event-copy plugin so their placement will be random
Now iam confused, why are they random?
Would you mind telling us little more about your Idea?
Yeah, maybe I should make a new post about my game and ask for help i need in that post. good idea 🙂
Its a game where you travel space and visiting different random planets for grinding etc. My planets and their objects are generated based on variables and all copied from a "items" map. I have functions alike zelda alltp.
No no no no =). I didnt ment your Game, i ment about the problem we are talking in this Thread.
Detailed Information that can help us to help you.
Edit:
Okay Events that can be Bombed are random placed.
But do they have an Event ID? With Event IDs, we could check those and use them in the earlier mentioned example further above in this thread.
Edit2:
Iam not native English and this is sometimes complicate to explain or to find the correct Words. If you have trouble following something, just ask in detail, and i can try different.
okay, but thanks for the idea I got from you anyways 🙂
Now iam confused, why are they random? because of the random map fuction for visiting different places.
Would you mind telling us little more about your Idea?
The idea is for player to blow up rocks and crates that is on a tile next to the bomb in any direction.
But I dont know how.
Lets say its a rock. If there are four rocks of the same copied event would we know the one rock from the other? whos rock number 3, or the rock thats being currently tempered with?
Yes exactly that i would need to know, because i dont know it =).
Iam not a Scripter, just a casual starter Eventer (Event Coder?).
If i know that we can somehow get something like an Event Id, that would be good.
OR
If we know that the Event is a Rock and all Rocks behave the same, than we can also do something.
But how do we know how to Erase that Event or to Switch its Eventpage?If there is a Way to access the Event from the outside somehow?
I seem the wrong person for this problem, you need someone who allready used that Plugin. Sorry, maybe i can help next time.
Maybe Link the Plugin you are using for the next Person. Maybe it helps somehow.
thanks really appreciated, I will shout out if solution is provided🙂