Bruce
Active member
Hello everyone,
As the tile says I am having issues with slam scripts and attack dropv - in the Openbor Template.
I am trying to set up the air throw or air down slash, but for some reasons nothing works.
I was able to make them work in the FF LNS, but not in the Openbor Template.
dropv -7 1 (even with dropv -30 1) is supposed to make the enemy fall down quickly, but it isn't working either!
Obviously, I am missing something or doing something wrong!
Can someone please help me with this?
Thank you
Here is the code:
Dante entity:
Grabs_Anim scripts:
Basically, the code is almost exact the same thing on this site. I just modified them a bit for better understanding
I am still learning about these scripts, so hopefully someone can help me understand these scripts better,
Thank you so much.
As the tile says I am having issues with slam scripts and attack dropv - in the Openbor Template.
I am trying to set up the air throw or air down slash, but for some reasons nothing works.
I was able to make them work in the FF LNS, but not in the Openbor Template.
dropv -7 1 (even with dropv -30 1) is supposed to make the enemy fall down quickly, but it isn't working either!
Obviously, I am missing something or doing something wrong!
Can someone please help me with this?
Thank you
Here is the code:
Dante entity:
Code:
name Dante
type Player
health 1000
mp 700
mprate 5
speed 32
jumpheight 12
jumpspeed 50
animationscript data/scripts/anim/Grabs_Anim.c
....
....
anim freespecial15
landframe 12
hitfx data/sounds/beat.wav
hitflash flash
loop 0
offset 346 524
bbox 290 270 140 170
delay 3
@cmd SlamStart
@cmd EnemyPosition 0 10 -10 1 0 # Tframe, X Y Z, face, NoWeight
@cmd dasher 0 6 0 # X Y Z
frame data/chars/Dante/DownSlash01.png
frame data/chars/Dante/DownSlash02.png
frame data/chars/Dante/DownSlash03.png
frame data/chars/Dante/DownSlash04.png
frame data/chars/Dante/DownSlash05.png
frame data/chars/Dante/DownSlash06.png
frame data/chars/Dante/DownSlash07.png
delay 5
frame data/chars/Dante/DownSlash08.png
frame data/chars/Dante/DownSlash09.png
delay 10
bbox 0 0 0 0
offset 186 693
frame data/chars/Dante/DownSlash10.png
attack 444 520 280 277 5 100 100 0 5 30
dropv -7 1
@cmd dasher 0 -3 0 # X Y Z
forcedirection -1
offset 184 860
frame data/chars/Dante/DownSlash11.png
attack 0 0 0 0
delay 999
offset 190 895
frame data/chars/Dante/DownSlash12.png
attack 440 820 260 147 10 100 100 0 30 30
dropv 0 1
sound data/sounds/slash3.wav
@cmd EnemyPosition 5 10 1 0 -1
@cmd ScreenBound -62 0 0 0 1
@cmd ReleaseGrabbedEntity 0
@cmd ThrowEnemy 10 3 10 10 0 1 # damage, type, XYZ, face
@cmd clearL
offset 203 910
delay 5
bbox 290 270 140 170
frame data/chars/Dante/DownSlash13.png
frame data/chars/Dante/DownSlash13.png
delay 5
frame data/chars/Dante/DownSlash14.png
frame data/chars/Dante/DownSlash15.png
Grabs_Anim scripts:
Code:
//from Kratus's SORX and others
void SlamStart() // Slam Starter for Cody/Guy grabbackward
{ // Slam Starter for nongrab slams
// Use Slam or ThrowEnemy after using this
void self = getlocalvar("self");
void target = getlocalvar("Target" + self);
if(target==NULL())
{
target = getentityproperty(self, "opponent");
setlocalvar("Target" + self, target);
}
if(target!=NULL())
{
damageentity(target, self, 0, 1, openborconstant("ATK_NORMAL4")); // Slam Starter
}
}
void EnemyPosition(int tFrame, float dx, float dy, float dz, int face, void noWeight)
{//Modify grabbed entity's position relative to grabber
//Use Grabstart or SlamStart 1st before using this
void self = getlocalvar("self");
void target = getentityvar(self,"grabbed");
int vFrame = getentityproperty(self,"animpos");
int dead = getentityproperty(target,"dead");
float weight = getentityproperty(target,"antigravity");
float limit = -0.03;
//THERE'S A NEW TARGET SAVED IN THE VARIABLE??
if(target != NULL()){
//USED WHEN PLAYER DIES BY TIME OVER AND THE GRABBER IS THE ENEMY
if(dead){
bindentity(target, NULL());
damageentity(target, self, 0, 1, openborconstant("ATK_NORMAL"));
damageentity(self, self, 0, 1, openborconstant("ATK_NORMAL"));
lockMpG();
setentityvar(self, "grabbed", NULL());
}else
//USED WHEN THE OPPONENT IS TOO HEAVY AND THE THROW/SLAM NEED TO BE INTERRUPTED (SOR1 BONGO)
if(weight < limit && !noWeight && vFrame > 1){
bindentity(target, NULL());
damageentity(self, self, 2, 1, openborconstant("ATK_LAND"));
lockMpG();
setentityvar(self, "grabbed", NULL());
}else
//DEFAULT
{
updateframe(target, tFrame);
bindentity(target, self, dx, dz, dy, face, 0);
}
}
}
void ReleaseGrabbedEntity(int ToGround)
{// Release grabbed entity
void self = getlocalvar("self");
void target = getlocalvar("Target" + self);
if(target==NULL())
{
target = getentityproperty(self, "grabbing");
setlocalvar("Target" + self, target);
}
if(target!=NULL())
{
bindentity(target, NULL());
if(ToGround == 1)
{
int x = getentityproperty(target, "x");
int z = getentityproperty(target, "z");
changeentityproperty(target, "position", x, z, 0);
}
}
}
void ThrowEnemy(int damage, int type, int Vx, int Vy, int Vz, int face)
{//Damage as throw finisher
void self = getlocalvar("self");
void target = getentityvar(self,"grabbed");
int z = getentityproperty(self,"z");
int tDir = getentityproperty(target,"direction");
int vDir;
if(face == 0){ //SAME FACING?
vDir = tDir;
}
if(face == 1){ //OPPOSITE FACING?
if(tDir == 0){ //FACING LEFT?
vDir = 1;
}
else
{
vDir = 0;
}
}
if(target != NULL()){
void atkType;
void eType = getentityproperty(target,"type");
int dir = getentityproperty(target,"direction");
int dropType = 1;
if(dir == 0){Vx = -Vx;}
if(type == 1){atkType = openborconstant("ATK_NORMAL8");}
if(type == 2){atkType = openborconstant("ATK_NORMAL9");}
if(eType == openborconstant("TYPE_PLAYER") || eType == openborconstant("TYPE_NPC")){
changeentityproperty(target, "projectilehit", "type_player", "type_npc", "type_obstacle");
}
else
if(eType == openborconstant("TYPE_ENEMY")){
changeentityproperty(target, "projectilehit", "type_enemy", "type_obstacle");
}
damageentity(target, self, 0, dropType, atkType);
lockMpG();
//AUTOMATICALLY REDUCES THE JUGGLEPOINTS TO ZERO IN ANY THROW/SLAM
if(getglobalvar("juggleSystem") == "off"){changeentityproperty(target, "jugglepoints", 0);}
changeentityproperty(target, "direction", vDir);
changeentityproperty(target, "damage_on_landing", damage); //RESET PROJECTILE STATUS TO 0 WHEN FALL ON THE GROUND, TOTAL DAMAGE
changeentityproperty(target, "aiflag", "projectile", 1);
FinishGrab(Vx, Vy, Vz); //EXECUTE ALL NECESSARY TASKS TO END THE GRAB MOVE (ANTIWALL, UNBIND AND TOSSENTITY)
setentityvar(self, "grabbed", NULL()); //CLEAR ENTITYVAR
}
}
void clearL()
{ // Clears all local variables
clearlocalvar();
}
void Screenbound()
{
.....
...
}
Basically, the code is almost exact the same thing on this site. I just modified them a bit for better understanding
I am still learning about these scripts, so hopefully someone can help me understand these scripts better,
Thank you so much.