Die_In_Fire
Well-known member
In some stages. when player loses a life, it respawns inside walls or over the walls...
how can I prevent this?
how can I prevent this?
Die_In_Fire said:it doesn't work for me...
@script
void self = getlocalvar("self");
int p = getentityproperty(self, "playerindex");
int animpos = getentityproperty(self, "animpos");
if ( animpos == 1 ) {
float x = getentityproperty(self, "x");
float z = getentityproperty(self, "z");
float a = getentityproperty(self, "a");
setglobalvar("p"+(p+1)+"respawn_x", x);
setglobalvar("p"+(p+1)+"respawn_z", z);
setglobalvar("p"+(p+1)+"respawn_a", a);
setglobalvar("last_player_spawned", self);
}
@end_script
I deleted it, but the crash continue, always after I select a game mode aka loading a stage. this is the log:White Dragon said:no longer need to write that code anymore.
if u take an error, can u post Whole log file?
Script function 'openborvariant' returned an exception, check the manual for details.
parameters: 18,
********** An Error Occurred **********
* Shutting Down *
There's an exception while executing script 'updateentityscript' data/chars/billy/bimmy.txtTotal Ram: 1063370752 Bytes
Free Ram: 286322688 Bytes
Used Ram: 13385728 Bytes
Release level data........... Done!
Release graphics data........ Done!
Release game data............
Unload 'Flash' ............done.
Unload 'blockflash' ............done.
Unload 'Bimmy' ............done.
Unload 'Jimmy' ............done.
Unload 'Chin' ............done.
Unload 'Ranzou' ............done.
Unload 'Chin2' ............done.
Unload 'Flare' ............done.
Unload 'Star1' ............done.
Unload 'Knife2' ............done.
Unload 'Shot' ............done.
Release game data............ Done!
Release timer................ Done!
Release input hardware....... Done!
Release sound system......... Done!
Release FileCaching System... Done!
**************** Done *****************
There's an exception while executing script 'updateentityscript' data/chars/billy/bimmy.txt
####animationscript function main#####
# data/chars/billy/bimmy.txt
########################################
void main()
{
int frame = getlocalvar("frame");
int animhandle = getlocalvar("animhandle");
if(animhandle==6)
{
if(frame==0)
{
clearL();
}
return;
}
if(animhandle==7)
{
if(frame==0)
{
clearL();
}
return;
}
if(animhandle==8)
{
if(frame==0)
{
clearL();
}
return;
}
if(animhandle==9)
{
if(frame==0)
{
clearL();
}
return;
}
if(animhandle==16)
{
if(frame==0)
{
ani0020(openborconstant("ANI_FOLLOW3"), openborconstant("ANI_PAIN2"));
}
if(frame==0)
{
ani0020(openborconstant("ANI_FOLLOW4"), openborconstant("ANI_FOLLOW2"));
}
return;
}
if(animhandle==23)
{
if(frame==0)
{
stop();
}
if(frame==0)
{
floater(10);
}
if(frame==1)
{
dasher(5, -3, 0);
}
return;
}
if(animhandle==38)
{
if(frame==0)
{
lock();
}
if(frame==0)
{
position(2, -10, 5, -1, 1);
}
if(frame==2)
{
position(2, 20, 20, -1, 1);
}
if(frame==4)
{
throw(26, 2, 2, 0, 0);
}
if(frame==4)
{
clearSlam();
}
return;
}
if(animhandle==39)
{
if(frame==0)
{
lock();
}
if(frame==0)
{
position(2, 7, 0, -1, -1);
}
if(frame==1)
{
position(2, 6, 8, -1, -1);
}
if(frame==2)
{
position(2, 7, 8, -1, -1);
}
if(frame==3)
{
position(2, 7, 8, -1, -1);
}
if(frame==4)
{
position(2, 8, 8, -1, -1);
}
if(frame==5)
{
throw(35, -2.5, 2.5, 0, 0);
}
return;
}
if(animhandle==45)
{
if(frame==0)
{
ani0020(openborconstant("ANI_FOLLOW5"), openborconstant("ANI_PAIN2"));
}
if(frame==0)
{
ani0020(openborconstant("ANI_FOLLOW4"), openborconstant("ANI_FOLLOW2"));
}
return;
}
if(animhandle==47)
{
if(frame==0)
{
ani0020(openborconstant("ANI_FOLLOW5"), openborconstant("ANI_PAIN2"));
}
return;
}
}
####animationscript function main#####
# data/chars/billy/jimmy.txt
########################################
void main()
{
int frame = getlocalvar("frame");
int animhandle = getlocalvar("animhandle");
if(animhandle==58)
{
if(frame==0)
{
clearL();
}
return;
}
if(animhandle==59)
{
if(frame==0)
{
clearL();
}
return;
}
if(animhandle==60)
{
if(frame==0)
{
clearL();
}
return;
}
if(animhandle==61)
{
if(frame==0)
{
clearL();
}
return;
}
if(animhandle==68)
{
if(frame==0)
{
ani0020(openborconstant("ANI_FOLLOW3"), openborconstant("ANI_PAIN2"));
}
if(frame==0)
{
ani0020(openborconstant("ANI_FOLLOW4"), openborconstant("ANI_FOLLOW2"));
}
return;
}
if(animhandle==75)
{
if(frame==0)
{
stop();
}
if(frame==0)
{
floater(10);
}
if(frame==1)
{
dasher(5, -3, 0);
}
return;
}
if(animhandle==90)
{
if(frame==0)
{
lock();
}
if(frame==0)
{
position(0, -10, 5, -1, 1);
}
if(frame==2)
{
position(2, 20, 20, -1, 1);
}
if(frame==4)
{
throw(26, 2, 2, 0, 0);
}
if(frame==4)
{
clearSlam();
}
return;
}
if(animhandle==91)
{
if(frame==0)
{
lock();
}
if(frame==0)
{
position(2, 7, 0, -1, -1);
}
if(frame==1)
{
position(4, 6, 8, -1, -1);
}
if(frame==2)
{
position(2, 7, 8, -1, -1);
}
if(frame==3)
{
position(2, 7, 8, -1, -1);
}
if(frame==4)
{
position(2, 8, 8, -1, -1);
}
if(frame==5)
{
throw(35, -2.5, 2.5, 0, 0);
}
return;
}
if(animhandle==97)
{
if(frame==0)
{
ani0020(openborconstant("ANI_FOLLOW5"), openborconstant("ANI_PAIN2"));
}
if(frame==0)
{
ani0020(openborconstant("ANI_FOLLOW4"), openborconstant("ANI_FOLLOW2"));
}
return;
}
if(animhandle==99)
{
if(frame==0)
{
ani0020(openborconstant("ANI_FOLLOW5"), openborconstant("ANI_PAIN2"));
}
return;
}
}
Die_In_Fire said:so somehow is conflicting with some other script...
I send you a pm with the mod. Is not a big of a deal as I can always go back to your previous script ;D
void p1 = getplayerproperty(0, "entity");
void p2 = getplayerproperty(1, "entity");
if(getentityproperty(p1, "exists")) {
}
@script
void self = getlocalvar("self");
int x = getindexedvar(0); //Get respawn x coordinate
int z = getentityproperty(self,"z"); //Get character's z coordinate
int a = getindexedvar(1); //Get respawn a coordinate
if(x==NULL()){
x = getentityproperty(self, "x");
}
if(a!=NULL()){
if(frame == 0){
changeentityproperty(self, "position", x, z, a+100);
}
}
@end_script