우선 모딩이 준비된 환경일경우 data 폴더에 scripts 폴더를 만들고 아래의 스크립트 파일들을 이 폴더에 넣어주세요.

 

spawns.c 파일을 만들고 메모장이나 Notepad++ 열어 아래의 코드를 입력하고 저장해줍니다.

void spawn01(void vName, float fX, float fY, float fZ)
{
	//spawn01 (Generic spawner)
	//Damon Vaughn Caskey
	//Spawns entity next to caller.
	//
	//vName: Model name of entity to be spawned in.
	//fX: X location adjustment.
	//fZ: Y location adjustment.
        //fY: Z location adjustment.

	void self = getlocalvar("self"); //Get calling entity.
	void vSpawn; //Spawn object.
	int  iDirection = getentityproperty(self, "direction");
	clearspawnentry(); //Clear current spawn entry.
      setspawnentry("name", vName); //Acquire spawn entity by name.

	if (iDirection == 0){ //Is entity facing left?                  
          fX = -fX; //Reverse X direction to match facing.
	}

      fX = fX + getentityproperty(self, "x"); //Get X location and add adjustment.
      fY = fY + getentityproperty(self, "a"); //Get Y location and add adjustment.
      fZ = fZ + getentityproperty(self, "z"); //Get Z location and add adjustment.
	
	vSpawn = spawn(); //Spawn in entity.

	changeentityproperty(vSpawn, "position", fX, fZ, fY); //Set spawn location.
	changeentityproperty(vSpawn, "direction", iDirection); //Set direction.
	return vSpawn; //Return spawn.
}

void spawnbind(void Name, float dx, float dy, float dz)
{ // Spawn and bind other entity
   void self = getlocalvar("self");
   void Spawn;

   Spawn = spawn01(Name, dx, dy, 0);
   bindentity(Spawn, self, dx, dz, dy, 0, 0);
}

void spawn02(void vName, float fX, float fY, float fZ, void Alias)
{
	//spawn02 (Generic spawner with alias)
	//Spawns entity next to caller.
	//vName: Model name of entity to be spawned in.
	//fX: X location adjustment.
	//fZ: Y location adjustment.
        //fY: Z location adjustment.
	void self = getlocalvar("self"); //Get calling entity.
	void vSpawn; //Spawn object.
	int  iDirection = getentityproperty(self, "direction");

	clearspawnentry(); //Clear current spawn entry.
      setspawnentry("name",vName); //Acquire spawn entity by name.
	if (iDirection == 0){ //Is entity facing left?                  
          fX = -fX; //Reverse X direction to match facing.
	}

      fX = fX + getentityproperty(self, "x"); //Get X location and add adjustment.
      fY = fY + getentityproperty(self, "a"); //Get Y location and add adjustment.
      fZ = fZ + getentityproperty(self, "z"); //Get Z location and add adjustment.
	
	vSpawn = spawn(); //Spawn in entity.

	changeentityproperty(vSpawn, "position", fX, fZ, fY); //Set spawn location.
	changeentityproperty(vSpawn, "direction", iDirection); //Set direction.
    	changeentityproperty(vSpawn, "name", Alias); //Set Alias to spawned entity
	return vSpawn; //Return spawn.
}

void spawnbind02(void Name, float dx, float dy, float dz)
{ // Spawn and bind other entity
   void self = getlocalvar("self");
   void frame = getentityproperty(self, "animpos");
   void Spawn;

   Spawn = spawn(Name, dx, dy, 0);
   bindentity(Spawn, self, dx, dz, dy, 0, 0);
   updateframe(Spawn, frame);
}

 

level.c 및 endlevel.c 두개의 파일을 만들고 편집하여 공통으로 아래코드를 입력하고 저장합니다.

void main()
{
   setglobalvar("zoomentity", NULL());
}

 

scripts.c파일을 만들고 아래의 코드를 입력하고 저장합니다.

#import "data/scripts/spawns.c"

 

다음은 적용할 해당 캐릭터의 프레임에 아래의 스크립트를 적용합니다.

anim special
   loop   0
   delay   5
   offset   107 203
@cmd spawnbind "zoomin" 0 0 0 //확대를 적용할 프레임에 넣어줍니다.
   frame   data/chars/mary/super01.gif
   blast   69 95 80 110 20 1
   frame   data/chars/mary/super02.gif
   frame   data/chars/mary/super03.gif
   blast   59 95 100 110 20 1
   frame   data/chars/mary/super04.gif
   frame   data/chars/mary/super05.gif
   blast   49 95 120 110 20 1
   frame   data/chars/mary/super06.gif
   frame   data/chars/mary/super07.gif
   blast   0
   frame   data/chars/mary/super08.gif
   frame   data/chars/mary/super09.gif
@cmd spawnbind "zoomout" 0 0 0 //축소를 적용할 프레임에 넣어줍니다.
   frame   data/chars/mary/super09.gif

 

  • 네이버 블러그 공유하기
  • 네이버 밴드에 공유하기
  • 페이스북 공유하기
  • 카카오스토리 공유하기