Topics regarding Scripting with Reality Factory
darksmaster923
Posts: 1857 Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA
Post
by darksmaster923 » Thu Mar 29, 2007 1:58 am
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.
zany_001
Posts: 1047 Joined: Fri Mar 02, 2007 8:36 am
Location: Aotearoa
Post
by zany_001 » Thu Mar 29, 2007 2:01 am
{
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.
darksmaster923
Posts: 1857 Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA
Post
by darksmaster923 » Thu Mar 29, 2007 2:02 am
thats how i always did it
Herp derp.
zany_001
Posts: 1047 Joined: Fri Mar 02, 2007 8:36 am
Location: Aotearoa
Post
by zany_001 » Thu Mar 29, 2007 2:03 am
PawnRender(false); //why is that false?
Once I was sad, and I stopped being sad and was awesome instead.
True story.
darksmaster923
Posts: 1857 Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA
Post
by darksmaster923 » Thu Mar 29, 2007 2:04 am
so you dont see the pawn
Herp derp.
zany_001
Posts: 1047 Joined: Fri Mar 02, 2007 8:36 am
Location: Aotearoa
Post
by zany_001 » Thu Mar 29, 2007 2:05 am
the enemy pawn,or the projectile?
Once I was sad, and I stopped being sad and was awesome instead.
True story.
zany_001
Posts: 1047 Joined: Fri Mar 02, 2007 8:36 am
Location: Aotearoa
Post
by zany_001 » Thu Mar 29, 2007 2:24 am
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.
darksmaster923
Posts: 1857 Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA
Post
by darksmaster923 » Thu Mar 29, 2007 5:28 am
i added a sound
the sound plays but no projectile
Herp derp.
darksmaster923
Posts: 1857 Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA
Post
by darksmaster923 » Fri Mar 30, 2007 12:16 am
discovery: me handtyping my own scripts means fireprojectile command doesnt work
Herp derp.
zany_001
Posts: 1047 Joined: Fri Mar 02, 2007 8:36 am
Location: Aotearoa
Post
by zany_001 » Fri Mar 30, 2007 4:34 am
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.
darksmaster923
Posts: 1857 Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA
Post
by darksmaster923 » Fri Mar 30, 2007 5:08 am
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.
QuestOfDreams
Site Admin
Posts: 1520 Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:
Post
by QuestOfDreams » Fri Mar 30, 2007 12:14 pm
Use FireProjectileBlind if you don't want to target an actor.
Juutis
Posts: 1511 Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland
Post
by Juutis » Fri Mar 30, 2007 12:40 pm
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.
darksmaster923
Posts: 1857 Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA
Post
by darksmaster923 » Fri Mar 30, 2007 4:54 pm
QuestOfDreams wrote: Use FireProjectileBlind if you don't want to target an actor.
that doesnt work either
Herp derp.