Few things I need to fix

NED

Well-known member
---------------------------------
Big post : May I split it in different parts/subjects?
Sorry if I did it wrong (??)
---------------------------------
Is there a way to make a spawn a particular effect displayed only on low level life

Code:
@cmd spawn01 "bdrop" 0 112 3#--name x y z--

I used to display it only in faint anim, But I would like to have it possible in
walk
run
idle
and a custom "dizzy" anim.
liedown

This is why I need to have it possible based on "life level" and not only in faint anim.

----------------------------------------------------------------------
I don't know why but when my player rises normally (without using riseattack)
She seems to be invincible to any attack.

Fall anim:
Code:
anim fall
	quakeframe	1 1 -11
	loop	0
	landframe	2 dus
	forcedirection	1
	delay	15
	offset	96 177
	bbox	67 82 62 90
	attack	67 82 62 90 5 1 0 1 15 0
	sound	data/chars/rachel/rdam3.wav
	frame	data/chars/rachel/fall1.gif
	bbox	58 100 81 54
	attack	58 100 81 54 5 1 0 1 15 0
	delay	300
	frame	data/chars/rachel/fall2.gif

	delay	55
	bbox	43 148 113 43
	frame	data/chars/rachel/fall4.gif

	delay	40
	bbox	43 148 113 43
	frame	data/chars/rachel/fall4.gif

2nd fall anim:

Code:
anim fall2
	quakeframe	1 1 -11
	loop	0
	landframe	2 dus
	forcedirection	1
	delay	15
	offset	96 177
	bbox	67 82 62 90
	attack	67 82 62 90 5 1 0 1 15 0
	sound	data/chars/rachel/rdam3.wav
	frame	data/chars/rachel/fall1.gif
	bbox	58 100 81 54
	attack	58 100 81 54 5 1 0 1 15 0
	delay	300
	frame	data/chars/rachel/fall2.gif

	delay	55
	bbox	43 148 113 43
	frame	data/chars/rachel/fall4.gif

	delay	40
	bbox	43 148 113 43
	frame	data/chars/rachel/fall4.gif

automatic rise (rise)

Code:
anim	rise
#	subentity	dus#t
#	summonframe	4 0
cancel 1 2 0 S freespecial34# forward reverse roll
cancel 1 2 0 F freespecial34# forward reverse roll
cancel 1 2 0 A freespecial38# LA VRAIE RISE ATTACK
	loop	0
	offset	96 177
	bbox	0 0 0 0

	delay	10
	frame	data/chars/rachel/fall4.gif#for reverse system
	delay	2
	frame	data/chars/rachel/fall4.gif#for reverse system

	delay	11#9
	frame	data/chars/rachel/rise1.gif
	frame	data/chars/rachel/rise2.gif
	frame	data/chars/rachel/j01.gif


rise faster (named riseattack)

Code:
anim	riseattack
cancel 1 2 0 S freespecial34# forward reverse roll
cancel 1 2 0 F freespecial34# forward reverse roll
cancel 1 2 0 A freespecial38# LA VRAIE RISE ATTACK
	loop	0
	offset	96 177
	bbox	0 0 0 0

	delay	10
	frame	data/chars/rachel/fall4.gif#for reverse system
	delay	2
	frame	data/chars/rachel/fall4.gif#for reverse system

	delay	11#9
	frame	data/chars/rachel/rise1.gif
	frame	data/chars/rachel/rise2.gif
	frame	data/chars/rachel/j01.gif


real rise attack (a freespecial)

Code:
anim	freespecial38
	damageonlanding 0 1#l'enemi peut faire des indirect damage
	subentity	dus#t
	summonframe	8 0
	loop	0
	offset	96 177
	bbox	0 0 0 0
	delay	8#11#9
	frame	data/chars/rachel/riseat1.gif
	hitfx	data/sounds/knee.wav
	attack	92 85 79 65 5 1 0 0 14 0
	dropv	5 3
	frame	data/chars/rachel/riseat2.gif
	attack	0 0 0 0 0 0
	sound	data/chars/rachel/kiai2.wav
	frame	data/chars/rachel/riseat3.gif
	frame	data/chars/rachel/riseat4.gif
	hitfx	data/sounds/beat2.wav
	attack	92 85 79 65 7 1 0 0 14 0
	frame	data/chars/rachel/riseat5.gif
	attack	0 0 0 0 0 0
	frame	data/chars/rachel/riseat6.gif
	frame	data/chars/rachel/riseat7.gif
	sound	data/sounds/land.wav
	frame	data/chars/rachel/j01.gif

------------------------------------------------------------------------------------------
My enemy character "Mex" have a taunt that is triggered in a particular range.
But IMO, It's a little too "scripted", I mean it happen really few times.
But When he's on the right range, he seems to over-do it. (repeat several times)

How can I use random code to make him doing it really randomly
Where the code have to be ? In idle and walk anims?

----------------------------------------------------------------------------------------

I'm coding a super move:
at the start it spawn a darker screen effect that pauses the action.
THis seems to work well, but sometimes, the effect isn't spawned at all.

Is there a limitation or something?


This is the start of super move with the spawn place.

Code:
#SUPER 2
anim	freespecial46
#energycost 300 1#100 1
      followcond 2
      followanim 6#2#8
	delay	8
	loop	0
	jugglecost	1
	offset	96 177
	jumpframe	3 1.4 4.3#3 3.9 4.3#3 4 4.1#3 4.2 4.1#3 4.3 4.5#3 3.9 4.3#3 4.5 4#2 3 1.6# frame Y X...
	landframe	12 dus#11 dus#10 dus
      attackone 1
	hitfx	data/sounds/empty.wav
	frame	data/chars/rachel/supB00.gif
	delay	1#11#14#15
	frame	data/chars/rachel/supB01.gif
...
...
...

This is the spawned effect file.

Code:
name	pause
type	text
subtype  noskip 
shadow	0
setlayer    -1


anim	idle
	loop	0
	delay	40
	offset	532 308
	bbox	0 0 0 0
	sound	data/sounds/energy.wav
drawmethod alpha 2
	frame	data/sprites/grey1
	@cmd	killentity getlocalvar("self")
	frame	data/sprites/empty.gif
 
Stun0001 effect is now fixed.
Thanks a lot.
I think this tips should be shared with community.
Can be really useful in a lot of situations. :)

---
About stomp move:
Yes the taunt move was triggered by player in FALL anim.
(but it don't check the right distance, right?)

I applied a random script you given before.
But even by using 100% for random value, it don't go to another follow anim.

Also, the stomp should only be activated with all these conditions:
-very close player (x 0-100) (z 20 width)
-liedown player
-60% chances in random
 
Isn't it better to activate the move with range.
And use some script to detect closer enemy is on the ground?

I'm still trying to figure how to make the move happen in the right conditions.
 
Frankly, there's a way to modify a function to suit that but I'm thinking, it is worth it? or is there a more efficient way?

If you don't mind a rather specific function then I'll give you :)
 
Alright, here you go, add this function in your animationscript:

Code:
void attackX(void PAni, int RxMin, int RxMax, int Ry, int Rz, int Ratio, void EAni)
{// Attack interruption if nearby opponent is in required status
// PAni : Player's animation to check
// RxMin : Minimum x range
// RxMax : Maximum x range
// Ry : Altitude difference
// Rz : Z range
// Ratio : Chance of the attack interruption
// EAni : Enemy's animation to change to
    void self = getlocalvar("self");
    float x = getentityproperty(self, "x");
    float y = getentityproperty(self, "a");
    float z = getentityproperty(self, "z");
    int dir = getentityproperty(self, "direction");
    void target = findtarget(self); //Get nearest opponent

    if(target!=NULL() && Ratio >=  50 - rand()%50){
      void PAnim = getentityproperty(target, "animationID");
      float Tx = getentityproperty(target, "x");
      float Ty = getentityproperty(target, "a");
      float Tz = getentityproperty(target, "z");
      float Disx = Tx - x;
      float Disy = Ty - y;
      float Disz = Tz - z;

      if(Disy < 0){
        Disy = -Disy;
      }

      if(Disz < 0){
        Disz = -Disz;
      }

      if( Disx >= RxMin && Disx <= RxMax && Disy <= Ry && Disz <= Rz && dir == 1 && PAnim == 

openborconstant(PAni) ){
        performattack(self, openborconstant(Ani)); //Change the animation
      } else if( Disx >= -RxMax && Disx <= -RxMin && Disy <= Ry && Disz <= Rz && dir == 0 && PAnim == 

openborconstant(PAni) ){
        performattack(self, openborconstant(Ani)); //Change the animation
      }
    }
}

In your case you should declare it like this:

@cmd attackX "ANI_FALL" 0 100 0 20 60 "ANI_FOLLOW2"
 
Thanks!
OK
I tried to apply it.
(For test purposes, I applied it in attack1 anim, and sending entity to taunt)
But, it provokes a crash
THis is how I activated it:

Code:
anim	attack1
range 30 70# (+ proche, + loin) (default 0 70)
	loop	0
	forcedirection	-1
	jugglecost	1
	offset	96 177
	bbox	68 72 66 109
	delay	5
#	sound	data/sounds/a1.wav
	sound	data/chars/mex/mex_kiai1.wav
	frame	data/chars/mex/a1.gif
@cmd attackx "ANI_FALL" 0 100 0 20 100 "ANI_FOLLOW2"
	delay	6
	attack	105 75 92 35 8 0 0 0 9 0
	dropv	1 0.8
	frame	data/chars/mex/a2.gif
	delay	8#10
	attack	0 0 0 0 0 0
	frame	data/chars/mex/a3.gif
	delay	5#7
	frame	data/chars/mex/a1.gif

THis is what says the log file:
Code:
Script compile error in 'animationscript': Ani line 1009, column 44

********** An Error Occurred **********
*            Shutting Down            *

Can't compile script!
Total Ram: 4195418112 Bytes
 Free Ram: 1215442944 Bytes
 Used Ram: 43540480 Bytes
 
Oops, sorry forgot something, here's the fixed function:

Code:
void attackX(void PAni, int RxMin, int RxMax, int Ry, int Rz, int Ratio,void EAni)
{// Attack interruption if nearby opponent is in required status
// PAni : Player's animation to check
// RxMin : Minimum x range
// RxMax : Maximum x range
// Ry : Altitude difference
// Rz : Z range
// Ratio : Chance of the attack interruption
// EAni : Enemy's animation to change to
    void self = getlocalvar("self");
    float x = getentityproperty(self, "x");
    float y = getentityproperty(self, "a");
    float z = getentityproperty(self, "z");
    int dir = getentityproperty(self, "direction");
    void target = findtarget(self); //Get nearest opponent

    if(target!=NULL() && Ratio >=  50 - rand()%50){
      void PAnim = getentityproperty(target, "animationID");
      float Tx = getentityproperty(target, "x");
      float Ty = getentityproperty(target, "a");
      float Tz = getentityproperty(target, "z");
      float Disx = Tx - x;
      float Disy = Ty - y;
      float Disz = Tz - z;

      if(Disy < 0){
        Disy = -Disy;
      }

      if(Disz < 0){
        Disz = -Disz;
      }

      if( Disx >= RxMin && Disx <= RxMax && Disy <= Ry && Disz <= Rz && dir == 1 && PAnim == openborconstant(PAni) ){
        performattack(self, openborconstant(EAni)); //Change the animation
      } else if( Disx >= -RxMax && Disx <= -RxMin && Disy <= Ry && Disz <= Rz && dir == 0 && PAnim == openborconstant(PAni) ){
        performattack(self, openborconstant(EAni)); //Change the animation
      }
    }
}
 
OK, no problem BB.

This time the mod can be launched, but it still crashes when you select a stage.

The log file seems to misunderstand something.

Code:
Command 'typemp' not understood in file 'data/levels/arena.txt'!
Loading 'resetvar' from data/sprites/resetvar.txt
Script compile error: can't find function 'attackx'

Script compile error in 'animationscript': attackx line 9, column 12
 
Thanks! my attention was really somewhere else  ::)

But for some reason, the game don't do the cancel at all.
For debugging I made the cancel occuring chance 100%, but still don't want to cancel.

I tried to copy the command on more frames to activate it more easily.
But still don't cancels.

Code:
anim	attack1
#range 30 70# (+ proche, + loin) (default 0 70)
	loop	0
	forcedirection	-1
	jugglecost	1
	offset	96 177
	bbox	68 72 66 109
	delay	5
#	sound	data/sounds/a1.wav
	sound	data/chars/mex/mex_kiai1.wav
	frame	data/chars/mex/a1.gif
@cmd attackX "ANI_FALL" 0 100 0 20 100 "ANI_FOLLOW2"
	delay	6
	attack	105 75 92 35 8 0 0 0 9 0
	dropv	1 0.8
	frame	data/chars/mex/a2.gif
@cmd attackX "ANI_FALL" 0 100 0 20 100 "ANI_FOLLOW2"
	delay	8#10
	attack	0 0 0 0 0 0
	frame	data/chars/mex/a3.gif
@cmd attackX "ANI_FALL" 0 100 0 20 100 "ANI_FOLLOW2"
	delay	5#7
	frame	data/chars/mex/a1.gif
@cmd attackX "ANI_FALL" 0 100 0 20 100 "ANI_FOLLOW2"
 
Thanks, I tried to apply this value, I even tried with "100" to be sure.
But he still continue using attack1 without canceling to stomp.  :-[
 
For the moment, I work on another thing since I can make the stomp more working in openbor.

THis is the slams of Mex (enemy).
Is it recomended to use grab as a starter for canceling to slams for enemies?
How to make it happen? Since enemies don't really use commands.

Thanks
 
Enemy's slamstarter can be grab or just attack and it is simpler since you can limit entity types to just player to prevent bug (problem with attempting to grab obstacles)
For starting slam with grab, it's same with player's. For starting with attack, you need followup to ensure the slam won't start if attack misses. In follow animation, you can immediately declare slam scripts, no need for checks if enemy is limited to hit players only.

BTW sorry about your previous problem, I haven't had time to check it.
 
I would have prefered the version with a regular grab starter, because it seems easier, but the enemy have already grabattacks. So how the cancel happens if I want to add a slam?

But, the grab starter don't seems to happen this much, so perhaps it's better to create a special grab starter that can be triggered easily.

About the stomp move, I still don't know how to fix it.
If openbor had some "hardcoded" way to detect liedown enemies, it would have been easier.
 
but the enemy have already grabattacks. So how the cancel happens if I want to add a slam?

Enemy's grabattack animation is triggered in unknown random way. That's why I prefer using single GRAB animation and set all slam scripts there without GRABATTACKs etc. Don't forget to set grabfinish 1 in enemy's header.
If I wanted to have random slam, I simply add randomness script.

For enemies, I prefer using attack to start slam cause it makes them dealier and look cooler too if they snatch you from distance ;)
 
  ned, I tried attackX function yesterday and it worked fine here so I'm not sure what's wrong in your end.
This is my setting:

@cmd attackX "ANI_ATTACK1" 0 200 50 100 100 "ANI_ATTACK1"
 
Thanks for the info for grab system.

About stomp move, I tried to apply your values.
But Mex still jabs the air without cancelling to follow2.  :-\

Is my setting wrong?
Code:
anim	attack1
	loop	0
	forcedirection	-1
	jugglecost	1
	offset	96 177
	bbox	68 72 66 109
	delay	5
	sound	data/chars/mex/mex_kiai1.wav
	frame	data/chars/mex/a1.gif
@cmd   attackX "ANI_FALL" 0 200 50 100 100 "ANI_FOLLOW2"
	delay	6
	attack	105 75 92 35 8 0 0 0 9 0
	dropv	1 0.8
	frame	data/chars/mex/a2.gif
@cmd   attackX "ANI_FALL" 0 200 50 100 100 "ANI_FOLLOW2"
	delay	8
	attack	0 0 0 0 0 0
	frame	data/chars/mex/a3.gif
@cmd   attackX "ANI_FALL" 0 200 50 100 100 "ANI_FOLLOW2"
	delay	5
	frame	data/chars/mex/a1.gif
@cmd   attackX "ANI_FALL" 0 200 50 100 100 "ANI_FOLLOW2"
 
I tested it. Still nothing.

I even tried with gigantic values just to be sure... (like 999 range...)
But not working.

Sometimes we have to destroy everything, then rebuild on top of it.
Do you think there is another way to trigger this stomp move?
Beside my crazy idea of cancelling attack1... :P

Sorry to bother you with this awful system I can't have working.  ???
 
Back
Top Bottom