OpenBOR v3.0 Build 3829

Status
Not open for further replies.

DCurrent

Site Owner, OpenBOR Project Leader
Staff member
Previously un-typed damage applied by engine is now defined with attack types:

  • ATK_LIFESPAN: Damage used to kill entity at end lifespan.
  • ATK_PIT: Damage used to kill entity that falls below PIT_DEPTH (iow, falls into a pit).
  • ATK_TIMEOVER: Damage used to kill entity when level timer reaches 0.
  • ATK_LAND: Damage received from default THROW animation, Damage on Landing attack parameter, and scripted Damage on Landing property.

Note that ATK_LAND is included in “Defense All”, whereas the other types are not. You can still set Defense for each of the others individually if you like, and yes that means you could make a character immune to its own lifespan, the level timer and even pits! Obviously this could cause some very weird behavior though, so make sure you know what you're doing.

A few uses would be:

  • Regulating damage given by or taken from certain throws and slams. As Damage on Landing was previously untyped, it would simply bypass Offense and Defense settings.
  • Detecting death by pits, the timer or lifespan. It was doable before, but will be a bit simpler now.
  • Other specialized effects, like perhaps an enemy that climbs up out of a pit if thrown in.

A quick technical note for anyone thinking of scripting some of the latter: When the engine attempts to kill an entity due to pits, timer or lifespan the default damage applied = current health.

One last thing. It has been a while since I've been under the hood so to speak, so any bug reports would be appreciated. Enjoy!

Download

DC
 
tested and every time i throw one enemy using default throw they fall and rise and then becomes static until i punch them to go back to normal
 
Code:
#define		ATK_NORMAL			0
#define		ATK_NORMAL2			1
#define		ATK_NORMAL3			2
#define		ATK_NORMAL4			3
#define		ATK_BLAST			4
#define		ATK_BURN			5
#define		ATK_FREEZE			6
#define		ATK_SHOCK			7
#define		ATK_STEAL			8					// Steal opponents life
#define		ATK_NORMAL5			9
#define		ATK_NORMAL6			10
#define		ATK_NORMAL7			11
#define		ATK_NORMAL8			12
#define		ATK_NORMAL9			13
#define		ATK_NORMAL10		14
#define		ATK_ITEM		    15

#define     ATK_LAND            16

#define     ATK_PIT             17

#define     ATK_LIFESPAN        18

#define     ATK_TIMEOVER        19

#define     MAX_ATKS            20                // default max attack types
#define     STA_ATKS            6                 // default special attack types: blast burn shock freeze steal


In this case STA_ATKS should be 10 and it seems script constants are not updated.

I'll take a look at it if DC isn't currently updating.
 
Ugh, I was afraid I'd miss something. I can't do any updates for a couple of days, so anything you can check would be a great help.

DC
 
No problem.

I'm changing those hard-coded numbers into macros so there'll be fewer mistakes like that in the future. As well as those strnicmp(value, "normal", 6) which one to count the length of a string.
 
Status
Not open for further replies.
Back
Top Bottom