Help with scripts!!!

kdo

Member
hello guys... Im using Bloodbane's Simple Scripts,  in this case  animationscript data/scripts/script.c, when i try to use the zoom effect  with animationscript data/scripts/spawns.c  the engine crashes.
Its probably  cause  the entity dont suport 2 animation script at time.
How could this problem be solved? is there a way to put spawn.c inside the lines of script.c?
I tried but without any sucess.
 
you can include or import spawn.c in the script.c

for example
Code:
#include "data/scripts/spawn.c"
Code:
#import "data/scripts/spawn.c"


add it at the top of the text file above other code

Code:
#import 	"data/scripts/spawn.c"


void block(int Flag)
{// Turns blocking status
    void self = getlocalvar("self");
    changeentityproperty(self, "aiflag", "blocking", Flag);
}

void move(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
     }
}
 
Thanks by the atention  BeasTie, but it didnt work for me... get this in log : Can't compile script 'animationscript'
In my script.c i already #import "data/scripts/shadow.c" and it works fine...i tried to put #import "data/scripts/spawn.c"  together but doesnt work.
I saw something in the forrum about conflict in put 2 animation script in the same entity...but  hope there is some solution to solve this...
thanks friend ...
 
Why not #include spawn.c now that you #import shadow.c?

Code:
name Ryu #Name of model
type player #entity type
health  100 #health {int}
gfxshadow	1
speed   14 #speed {int}
load       hadoken
animationscript data/scripts/script.c

script.c:
Code:
#import	"data/scripts/script_actual.c"

script_actual.c:
Code:
#include "data/scripts/paus0001.c"
#include "data/scripts/dcancel.c"
#include "data/scripts/ani0020.h"
#include "data/scripts/library/basic.h"
#include "data/scripts/library/spawn.h"
#include "data/scripts/library/target.h"
 
Mmm... kdo, do you have spawn.c or spawns.c? One letter difference could cause crash so you need to modify Beastie's suggestion to suit script's name
 
Back
Top Bottom