fire projectile

Topics regarding Scripting with Reality Factory
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

fire projectile

Post 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" );
	} ]
}
Herp derp.
User avatar
zany_001
Posts: 1047
Joined: Fri Mar 02, 2007 8:36 am
Location: Aotearoa

Post by zany_001 »

{
Spawn[() //you put a space inbetween,that might not change anything, just watch the spaces
Once I was sad, and I stopped being sad and was awesome instead.
True story.
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Post by darksmaster923 »

thats how i always did it
Herp derp.
User avatar
zany_001
Posts: 1047
Joined: Fri Mar 02, 2007 8:36 am
Location: Aotearoa

Post by zany_001 »

PawnRender(false); //why is that false?
Once I was sad, and I stopped being sad and was awesome instead.
True story.
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Post by darksmaster923 »

so you dont see the pawn
Herp derp.
User avatar
zany_001
Posts: 1047
Joined: Fri Mar 02, 2007 8:36 am
Location: Aotearoa

Post by zany_001 »

the enemy pawn,or the projectile?
Once I was sad, and I stopped being sad and was awesome instead.
True story.
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Post by darksmaster923 »

the pawn
Herp derp.
User avatar
zany_001
Posts: 1047
Joined: Fri Mar 02, 2007 8:36 am
Location: Aotearoa

Post 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.
Once I was sad, and I stopped being sad and was awesome instead.
True story.
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Post by darksmaster923 »

i added a sound
the sound plays but no projectile :(
Herp derp.
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Post by darksmaster923 »

discovery: me handtyping my own scripts means fireprojectile command doesnt work
Herp derp.
User avatar
zany_001
Posts: 1047
Joined: Fri Mar 02, 2007 8:36 am
Location: Aotearoa

Post 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?
Once I was sad, and I stopped being sad and was awesome instead.
True story.
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Post 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
Herp derp.
User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Post by QuestOfDreams »

Use FireProjectileBlind if you don't want to target an actor.
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post 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. :?
Pain is only psychological.
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Post by darksmaster923 »

QuestOfDreams wrote:Use FireProjectileBlind if you don't want to target an actor.
that doesnt work either
Herp derp.
Post Reply