Avengers United Battle Force

In Progress Avengers United Battle Force 2.7.41

No permission to download
The project is currently under development.
Thanks man, its perfect!
xCM1hkk.png
 
Bad news: I discovered that Weaponframe (or the script version) is totally broken.

Lets call normal mode BRAND and gun mode BRAND_W.

I have a script which counts how much bullets BRAND_W has and, if it reaches 0, the scripts makes her go to an animation (FREESPECIAL2) then change back to BRAND.

I discovered that the engine randomly changes back to BRAND and CHANGE the animation to freespecial2, which its impossible. Sometimes, everything goes normal: she goes to freespecial2 of BRAND_W.

Sometimes, its ever worse: the engine simply CRASHES, without reverting back to BRAND and there is no trace in the log. It simply crashes and its done.

I won't waste more time on that mode (I've spent days to fix it), so I will remove her Gun mode.

but to know that there is a random bug in the engine which can't be tracked (so I can fix it) really lower my motivation to work with OpenBOR to a very low level...


 
wow hmm i wonder why that is O i use weapons modes a lot for my game and havnt encountered that are you sure it doesnt have to do with another script for bullets clashing with that script?
 
After trying to kill myself a bit, I had a little success. The problem occurs by two reasons:

1) I use a drawsprite function to, guess what, show a sprite. For some unknow reason, the function wasn't receiving the value of a global variable (which stores the icon) because...

2) some globalvar are holding their values.

What was the trick? Sometimes, OpenBOR logs the error (telling about the missing value in drawsprite), sometimes not. He just started to report it after I run the executable many times in a row.

I need to further investigate this. Wish me luck.
 
O Ilusionista said:
2) some globalvar are holding their values.

I need to further investigate this. Wish me luck.

I think of global vars like I would global vars in any language: Pure evil that should be avoided at all costs; they always bite you in the arse at some point. Doubly so in OpenBOR because globals are persistent across saved games. That's by design and handy if you control it, but a witch's brew of potential issues I want no part of.

If you must have a global var, I recommend indexed vars and defined constants to identify them. No unexpected values carried over, no accidentally crossing up your identifiers, and as an extra bonus they are quite a bit faster.

Next thing is to remember that typeof wants to be your friend. Always, ALWAYS verify a value before doing something with it; it's just good coding practice no matter what you're working on. If the variable is empty then skip the sprite draw, or (better) send an alert to the log AND skip the sprite draw. Then back trace why the sprite is missing. I'm betting the break point is your initial population of the global.

DC

 
Thanks, I will take a look into that.

But there is happening something REALLY strange: Whenever I am on the weapon model using the FREESPECIAL6 to rever back to normal model, it works...but the engine tells to the normal model to use go to FREESPECIAL8, and I haven't told that in anywhere on the code.

By using a debug, I found that both share the same ANIMID (because the weapon model has less animations), so the engine is trying to "match" those animations. which I never told it to do. Another char has the same weapon change and don't do it - it simply go to idle animation of the normal mode. I remember I even requested if there is a way to specific which animation the wepaon model should use.

Beastie told me that the weapon model would use respawn, but it just ignores it. By the way, I found that ONSPAWNSCRIPT is totally ignored when you use WEAPONFRAME. Maybe because there isn't a SPAWN per se.
 
O Ilusionista said:
Beastie told me that the weapon model would use respawn, but it just ignores it. By the way, I found that ONSPAWNSCRIPT is totally ignored when you use WEAPONFRAME. Maybe because there isn't a SPAWN per se.

I'll have to think on the rest, but you are correct in this being intentional behavior. A weaponframe or model switch is not a spawn at all, so does not activate onspawnscript.

DC
 
What droves me crazy was the lack of info at the log. All that I see was DRAWING WATER... DRAWING WATER... DRAWI... (there is a cut here). Then after I executed it many times in a row and bingo, there was the right log.
 
that usually happens with me when i dont add a script or add it wrong then it loads a log and there is no error.  I feel your pain :(
 
Some progress...

1) Emma Frost now has the ability to mind control the enemies (thanks BB for the code)
5797GbJ.png

Once hit by Pyschic Bolt (D U +A), the enemy will be fighting against the other enemies.
To avoid cheapness, there are several things which can affect this case:

- It doesn't works on non-organic enemies
- If Emma change to her Diammond Form or she dies, the control is over.
- Each time the mind controlled enemy rises from the ground, there is a good chance of the control to be break.


The good thing is that I managed to not need to duplicate enemies projectiles, I can use the same projectile for enemies and mind controlled enemies (they act as NPC) with script.

Plus, like in some comics, some mind controlled enemies acts better than normal enemies. Gunners, for example, shoots way faster while on this mode. She still has her "freeze" bolt, which was moved to D D +A. But It doesn't works on non-organic enemies either.

2) Started to work on branches
XnytM2z.png


Like I said some pages ago, this screen happens after you defeat Hydra Golem. The upward branch goes to The Port area, while the branch at right leads you to another screen.  This will act as different routes, since each one has different bosses and enemies.
 
Thanks to jonsilva, now we have proper reflections in the windows
G1GiX2C.png


those "white lines" on the windows have a different scroll speed, kinda like in SoR Remake, to simulate different reflections.
 
Back
Top Bottom