Technology Temerity

Bind & Punishment

A last issue with my current throwing system was allowing the grappled entity to be attacked or otherwise affected by entities other then the one grappling it. While already possible, doing so caused an offset issue where characters would appear to teleport briefly when taking damage. In addition, it was important to immediately run the @bind0010 whenever attacker damaged defender.

The cause is due to OpenBOR overriding the current bound animation with whatever pain or fall animation an attack would result in. Only by manually reestablishing the bind could this be dealt with. Easy enough to take care of for the primary attacker (adding another @cmd bind0010 directly after the damage command as mentioned above). For outside interference however, the solution is a bit more involved.

My first attempt was to look for an existing bind and reapply it during the takedamagescript event. That effort was a complete failure. Further expermentation reveled something I already knew and had simply forgotten; takedamagescript runs before pain/fall animations are applied. this is in fact the very reason I had added onfallscript and onpainscript events to the engine.

After realizing this I knew it would be easy enough to reapply the bind using onpain/fall events, but it also meant bind offsets could not simply be calculated with math (they no longer exist and the entity has been moved). Ultimately, offsets and animation settings must be stored on the bound entity. So the bind0010 function was given needed modifications to perform the storage and a new function that reestablishes binds during pain/fall events was created.

Overall I am happy with the solution, except for having to establish more variables. I would much prefer to calculate the bind offset via formula and apply it. While theoretically possible to do that, at the very least the anchor entity and defender’s bound animation have to be stored, so best to go ahead and store the rest to ensure the bind will always be set as it was.

On a more disconcerting and extremely annoying note, MS Visual Studio no longer prints or exports code with color formatting . MVPS technicians tell us they didn’t have time to implement it. Funny thing, all previous versions had it. So what, they didn’t have time to not take something out? Adding insult to injury, the line numbers still print in color… really?

bind0010_09182010
bind0020_09182010

Author: Damon Caskey

Hello all, Damon Caskey here - the esteemed owner of this little slice of cyberspace. Welcome!

1 Comment

Leave a Reply