[SOLVED] Boss attacking after set time/delay

DJGameFreakTheIguana

Active member
If someone can help me with this, I'm setting up a boss that I want to follow the played for a fixed amount of time/delay, and then attack, not on it's own like most enemies. The boss is a machine that comes down from a heightened offset to smash the player, who's trying to dodge. Once the machine hits the ground, it's the players chance to attack it before it goes back up and repeated the process. Anyone have a command for that?

x)
 
I've tried pasting it into your script but it makes the game crash every time, but I will need that back in there.

Okay then, here it is:

Code:
anim follow1
@script
   void self = getlocalvar("self");
    int posx = getentityproperty(self, "x");

   if(posx>=240)
    {
        changeentityproperty(self, "velocity", 0, 0, 0) ;
    }

  if(frame==8){
    setentityvar(self, 1, openborvariant("elapsed_time"));
  }
@end_script
...

The timer still doesn't reset sometimes

Strange
 
Actually I just remembered something. You need to update the script in WALK animation to this:

Code:
anim walk
	loop	1 1 3
   @script
   void self = getlocalvar("self");
   int Summon = getentityvar(self, 1);

 if(Summon <= openborvariant("elapsed_time") - 300){
         setentityvar(self, 1, NULL());
        changeentityproperty(self, "velocity", 0, 0, 0) ;
         performattack(self,openborconstant("ANI_FOLLOW2"));
    }
   @end_script
...

The added line is to stop entity before changing to FOLLOW2
 
Back
Top Bottom