Page 1 of 2

fire projectile

Posted: Thu Mar 29, 2007 1:58 am
by darksmaster923
i always seemed to have a problem with shooting projectiles at nothing
nothing happens!
CODE(test script)

Code: Select all

{
	Spawn[ ()
	{
		Console(true); //Doesnt display console
		LowLevel("Setup");
	} ]
	
	Setup[ ()
	{
		PawnRender(false); //no pawn no more
		PositionToPlayer(0, 0, 50, true, true);
		self.think = "Idle";
	} ]

	Idle[ ()
	{
		self.ThinkTime = "0.2";
		PositionToPlayer(0, 0, 50, true, true);
		SetTargetPoint(0, 0, 5000 );
		FireProjectile("armor_shell", "BIP 01", 0, 0, 25,"enemy_health" );
	} ]
}

Posted: Thu Mar 29, 2007 2:01 am
by zany_001
{
Spawn[() //you put a space inbetween,that might not change anything, just watch the spaces

Posted: Thu Mar 29, 2007 2:02 am
by darksmaster923
thats how i always did it

Posted: Thu Mar 29, 2007 2:03 am
by zany_001
PawnRender(false); //why is that false?

Posted: Thu Mar 29, 2007 2:04 am
by darksmaster923
so you dont see the pawn

Posted: Thu Mar 29, 2007 2:05 am
by zany_001
the enemy pawn,or the projectile?

Posted: Thu Mar 29, 2007 2:11 am
by darksmaster923
the pawn

Posted: Thu Mar 29, 2007 2:24 am
by zany_001
try going through it step by step,until you find something wrong,or else compare it to any working scripts you have.

Posted: Thu Mar 29, 2007 5:28 am
by darksmaster923
i added a sound
the sound plays but no projectile :(

Posted: Fri Mar 30, 2007 12:16 am
by darksmaster923
discovery: me handtyping my own scripts means fireprojectile command doesnt work

Posted: Fri Mar 30, 2007 4:34 am
by zany_001
So it works?and perhaps its the space here:
"BIP 01"
change the name so its got no space,cos it might be messing up the engine.

***EDIT***
SetTargetPoint(0, 0, 5000 );
isnt 5000 a bit big?

Posted: Fri Mar 30, 2007 5:08 am
by darksmaster923
zany_001 wrote:So it works?and perhaps its the space here:
"BIP 01"
change the name so its got no space,cos it might be messing up the engine.

***EDIT***
SetTargetPoint(0, 0, 5000 );
isnt 5000 a bit big?
also how i always did it.

5000? dunno

Posted: Fri Mar 30, 2007 12:14 pm
by QuestOfDreams
Use FireProjectileBlind if you don't want to target an actor.

Posted: Fri Mar 30, 2007 12:40 pm
by Juutis
FireProjectile works like that too, at least I have always used FireProjectile() with SetTargetPoint and it works perfectly.
discovery: me handtyping my own scripts means fireprojectile command doesnt work
Yeah, that has happened to me too. Sometimes they just don't work when I type them, but when I copy the exactly same piece of text from the manual it works... That's just weird. :?

Posted: Fri Mar 30, 2007 4:54 pm
by darksmaster923
QuestOfDreams wrote:Use FireProjectileBlind if you don't want to target an actor.
that doesnt work either