📧 Message Board Archive

A fighting engine.
Nothing like christiaans, this would be fighting like urban chaos in 2-d.



Basically, the idea is to create several one monster screens which disable dink's magic... except his "fighting skills".  Your opponent has a variable, &monsterstatus called during his script.  Every time your opponent is hit, the value of &monsterstatus is used to determine the strength of the blow.  If your opponent uses a block move, &monsterstatus is set to five.  The hit() function notices this and lessens the force of the blow.  If your opponent is in the midst of a standard attack when you hit, &monsterstatus is changed, the hit() function notices this and temporarily stuns the enemy.  &stun would be another variable.  It would determine how much stun time your enemy has left.  You could use a while() type statement to keep the monster in stun for a certain time.  Damage to your enemy could also be determined by a global variable &status.  When dink uses an attack of any sort, the variable changes to reflect the attack type.  The monster, if not stunned or attacking, will easily block a powermove, while it will have trouble blocking a speedmove.  Also set in the use() function would be a temporary defense reduction, or something to stun dink.



Any obvious problems?
No problems, then... excellent
My brother and I are working on a larger mod, but I'll include my basic fighting system in my small mod for bosses(It can only handle 1 enemy)
Cancel that
I am having plenty o problems.



It won't accept my infinite pausing loop.

basically the monster script looked like this



void main( void )

{

initialize variables



crap:



innercrap:

if (stun_time_left > 0)

{

update stun time:

goto innercrap:

}



if (dink is in area around monster)

{

set monster to defend

wait(500)

set monster to normal

}



if(monster is attacking or other)

{

wait(100)

goto crap

}



wait(100)

goto crap

}





It wouldn't loop!!
Dink C doesn't support functions?!?!
Does Dink C support functions?



I called:



stun(10);



when dink hit the monster.

The script looked like this:



int stun( int );



void main( void )

Re: Dink C doesn't support functions?!?!
Last post got cut off.

void stun( int );



void main( void )

{

stuff

}

void hit( void )

{

say("diagnostic", &current_sprite);

stuff

stun(10);

}

void die( void )

{

stuff

}



void attack( void )

{

stuff

}







void stun(int &stun_time)

{

&stun_time *= 50

freeze(&current_sprite);

say("", &current_sprite);

wait(&stun_time);

unfreeze(&current_sprite);

&stun /= 50;

}