Gurtag
Active member
hey guys, have been using some script i found around and whant to ask a few questions.
how can i turn this one in to a function?
got this one from ilu´s AUBF game, is there a way to make this move script to afect the wole anim instead of having to declare it on every frame? i mean make it work like the move command so to speak
how can i turn this one in to a function?
Code:
@script
void self = getlocalvar("self");
if(frame==0)
{
changeentityproperty(self, "lifespancountdown", 39);
}
@end_scrip
got this one from ilu´s AUBF game, is there a way to make this move script to afect the wole anim instead of having to declare it on every frame? i mean make it work like the move command so to speak
Code:
void mover(int dx, int dz,int da)
{ // Moves entity freely and ignores obstacles
void self = getlocalvar("self");
int x = getentityproperty(self,"x"); //Get character's x coordinate
int z = getentityproperty(self,"z"); //Get character's z coordinate
int a = getentityproperty(self,"a"); //Get character's a coordinate
int dir = getentityproperty(self,"direction"); //Get character's facing direction
if(dir==0){ // Facing left?
changeentityproperty(self, "position", x-dx, z+dz, a+da); //Move
}
else if(dir==1){ // Facing right?
changeentityproperty(self, "position", x+dx, z+dz, a+da); //Move
}
}