Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

All of the events in LAi_Fightparams.c are hardcoded into the engine and are part of the NPC character init when they are instantiated, for the engine to gather values that can be set from the scripts, as part of the character's AI settings.

You can define your own events, but unless you want a time delay, it's just as easy to directly call the function that the event would call as part of the handler.  And your user-defined events can only be called from some other part of the script code execution defined by you, and won't be launched by the engine on its own, like these hardcoded events.

Thanks for answer, bro. But at least I need this events cause of engine functions. I dont know how to make character to not stun after hit and I dont Know how to make character do the recoil. I thought this "events" or functions are not available for me with Scripts from folder Program. I need to do this two events like character Stun or Not and Character do the recoil or not.

The recoil and stun appear to be built into the character animation logic, in conjunction with the engine's fight AI calculations.  I do not see any simple way to provide a way to override that with scripts at the moment.  With the current design, it might be possible to eliminate the stun/recoil by removing the animation from the .ani files, or maybe the character action attributes (e.g. actions.hit_.... attributes in SetDefaultFight script function), but that would remove it for all times, not just a case-by-case basis, and I don't think you can induce a hit/recoil upon a character without the engine AI calculating an actual character hit at the moment.

(3 edits)

F**k, it doesnt work from scripts at least. I wrote something like this in LAi_ApplyCharacterAttackDamage: 

if(stunEnable) 

{

enemy.actions.hit_attack.h1 = "";

enemy.actions.hit_attack.h2 = "";

enemy.actions.hit_attack.h3 = "";

}

But actually enemy has this animations. I think it will work only after reLogin. And now I absolutly know, that it should work in engine. If I (or u) could create event, which will calculate chance of "NonStun" it gonna be great addition to fighting. I know how to write events code, but i cant change engine for this event, which should let Char to stun after hit, or doesnt let, in dependence of events calculations results.

(1 edit)

I want to say, that attributes are empty, but char still can have stun after hit.

Also I deleted this:

character.actions.hit_attack.h1 = "";

character.actions.hit_attack.h2 = "";

character.actions.hit_attack.h3 = "";

In SetDefaultFight, and Char still stuns from hits...

I still waiting :3