"ATTACKDELAY" OMG,Why it's not working???

Topics regarding Scripting with Reality Factory
Post Reply
User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

"ATTACKDELAY" OMG,Why it's not working???

Post by metal_head » Fri Sep 19, 2008 5:40 pm

I want to increase the delay between the shots of a pawn...
Like always,I'm with perfectai.s,and in the variables there's that
ATTACKDELAY variable (by default it was set to...I think to 0.2)
I increased it,but no effect,I increased it one more time,so it got [8],but absolutely no effect :(
Than I took a look at the script to see how's that variable used and I found this:

Code: Select all

monster_missile_start[ ()
	{
		Animate(MISSILEATTACK);
		fire_delay = time + FIREDELAY;
		PlaySound("shotfire.wav", 500);
		TargetPlayer();
		UpdateEnemyVis(true); 			
		UpdateTarget();
		self.ideal_yaw = enemy_yaw;				
                         SetHoldAtEnd(true);
		self.ThinkTime = 0.3;
		self.think = "monster_missile";
		skill_time = time + (SKILL*0.1);		
		attack_delay = time + ATTACKDELAY;		} ]
That's a low level command,right? I saw that attack_delay = time + ATTACKDELAY; ..I don't know, (because I'm a newb in scripting),but that should work,right? than why when I change the ATTACKDELAY variable to something else,nothing happens? I think the same is with the FIREDELAY variable and I will need this to make one of the alien's attack

User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

Re: "ATTACKDELAY" OMG,Why it's not working???

Post by metal_head » Sat Sep 20, 2008 9:16 pm

I know it sounds stupid that I can't make it myself,but I tried several things and it's not working,the enemy keeps attacking the player at the same speed :(. I know that at this point I should be able to solve this,but I don't understand a lot all this with the delays between the shots

Post Reply