KAZESUI'S PROFILE

Doing Super Programming
on Super Computers
for Super Performance
The Curse of Cpt. Lovele...
Nautical-themed cephalopod-pirate-based action-shmup.

Search

Filter

[2k3] Proximity detection event problem

That looks like a nifty branch hell you've got there. Probably one of the branches is set wrong... but instead of looking through which it might be, you should change your approach.

After you've subtracted the coordinates of the hero to that of the chest, have 2 branches check if either of the current values are negative. If so, multiply that value by -1, making it positive. Then you add the values into each other and you will now have the value of the range.

In this case, that would mean you'd check if the sum you just got is equal to or less than 4. Should probably weed out the bug as well, since it's lot less code and easier to go through (and lot easier to change if you want to change the range of the hero)

[OVER][Contest] DynRPG Plugin Programming Contest - Win Amazon Gift Cards! - NEW: Pathfinding plugin submitted!

Yes, but you'd have to event it in with battle events, since the particle effects are called with comments

[OVER][Contest] DynRPG Plugin Programming Contest - Win Amazon Gift Cards! - NEW: Pathfinding plugin submitted!

Here's a particle effects plugin:



download

Mapping Contest #1

It's true that I didn't use any plugins for this map, I merely needed some extra pictures, and the DynRPG patch lags less than the HyperPatcher2 alternative.

The common events used for the calculations aren't that big though, since the ones actively used are only doing a quick lookup in a LUT, and thus not that heavy. I think it's more an issue of there just being too much on the screen rather than the ongoing calculations (50 picture per effect).

I'm looking into making a particle effects plugin though, which should probably reveal how much more efficient it would really be.

[OVER][Contest] DynRPG Plugin Programming Contest - Win Amazon Gift Cards! - NEW: Pathfinding plugin submitted!

Yes. I have made a Insertion Sort plugin and haven't had any trouble with the other classes I've played with so far.

[OVER][Contest] DynRPG Plugin Programming Contest - Win Amazon Gift Cards! - NEW: Pathfinding plugin submitted!

I keep getting undefined reference errors when I try to use RPG::Image::create, even with the sample code you posted in the "getting started" section.

Static Events [2K3]

Yeah, you're not really checking for any event ID at 0,0. you're just moving your events there while you're checking the tile they stood on, prior to moving them to 0,0 for any events. 0,0 was just choosen cuz it ought to be a place where there will be nothing.

And the scan would probably better be in page 1 somewhere. I have a slightly altered version which will check for other events of other big objects, but it doesn't check if that event is just ornamental (like you're lower layer), meaning it would cause some weird passability issues with them, and fixing it would probably require adding an extra page to all events which can be called to determine whether they're passable or not...

so yeah, if you can design it so that there is no instance of the big objects can collide, it would probably make stuff simpler.

Math Problem

Sorry for delay.
Guess I misunderstood you up there as well, and thought the house (i.e. the interior) was part of you map grid as well.

Anyway, as long as I'm still not misunderstanding you, I should have a working sample right now which you can look at.
Explained in short, you just get the tile coordinates, mod them with 20 and 15 to get their coordinates relative to the grid, then subtract them with 9 and 7 to see how far off from the center you are, and then pan the screen according to the offset you now have.

Important to note here is that you'll need to pad your map with 20x15 grid elements which you won't be able to access, otherwise you'll have to have map specific events to determine whether you're close to the edge of the map so that you can adjust accordingly in terms of panning the screen (more complicated).

Anyway, here's the sample project

The first common event is probably the one you're looking for

Static Events [2K3]

I should probably have tried to add the modification. So much stuff which is easy to forget. Yes, you're completely right, and that makes the whole deal slightly more difficult than I originally thought.
What I've used to do up to now is to move events who are checking for other events on their ID to somewhere (usually coordinates 0,0) check for event ID's and then afterwards back.

The event needs to be removed before it can check for Event ID's otherwise you'd risk it overlapping with an event with lower event ID, which it won't see cuz it only returns the highest event ID on the selected tile.
just moving the event, checking for event ID's and moving it right back will not be visible for the player as long as there is no wait's in between.
Doing this, you'll have to reset the event location to the position stored in coordinate variables set before and then you'll need to move the events again... I think. I'm not sure whether the events will remember the previously issued move event after having been moved with change event location.

That's the theory at least, might very well be more details I've forgotten in there though

Static Events [2K3]

Ah, I guess I might have forgotten to adress that issue. It shouldn't be very hard to solve though. To do it, add a "get event ID" right after the "get terrain ID", and then check if the value is = 0, which means no events is in the way. If not, just switch the "Obstacle in the way" switch on and end event processing.

If you use events for graphics or whatnot which should be passable, you ought to make the event ID's of all big obstacles as well as any other impassable obstacle sequential, so that you can check for all of them with two branches, i.e. if event ID is higher than the lowest event ID and less than the highest.