FireProjectile();

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:

FireProjectile();

Post by metal_head »

OK, so what I'm trying to do is a exploading barrel (when you shoot it, it explodes). I though that I could make the barrel shoot a projectile straight to the ground when hit and than get removed. So I did it, but the problem is that the ForeProjectile command doesn't work for this, the projectile is shooted horizontaly and hits the nearest obstacle...how can I make the projectile shoot downwards? The fireprojectile command doesn't offer any angle settings...
User avatar
creekmonkey
Posts: 116
Joined: Tue Oct 23, 2007 2:55 pm

Re: FireProjectile();

Post by creekmonkey »

MH I did the exploding barrel in a level I was working on some time ago, I made a low polly barrel in Milkshape and animated the individual polys...added an explosion in RF and it looked pretty good...Sorry I no longer have the files or I would upload them. Milkshape also has an explosion plugin, but it made way to many polys to suit my needs.
User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

Re: FireProjectile();

Post by metal_head »

Well yeah, but I wanna make a barrew with scripting, that way the barrel will trigger the other barrels arround it to explode too (I did this, but with a projectile and the projectile is fired horizontaly, I want the projejctile to be fired downwards)
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Re: FireProjectile();

Post by Juutis »

Have you figured this out already? I seem to be on a posting spree so I might as well bump some older threads too. Better late than never, right? :)

There's a command called SetTargetPoint() that sets the point where the projectile is fired. So something like SetTargetPoint(0,-100,0) should do the trick.
Pain is only psychological.
User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

Re: FireProjectile();

Post by metal_head »

Strange, it didn't change anything (it's in Low Level, right?)...

Amm I got another idea how to make this, but I got some sort of a problem. The idea is the pawn to just play an explosion and do damage in certain radius arround it, but I don't know how this damage thing could be done without a projectile. I've looked in the manual for a command for this, but I found nothing :(

Have you figured this out already? I seem to be on a posting spree so I might as well bump some older threads too. Better late than never, right?
Oh, that's so cool, I got something really important to ask about, I'll ask it later :)
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Re: FireProjectile();

Post by Juutis »

metal_head wrote:Amm I got another idea how to make this, but I got some sort of a problem. The idea is the pawn to just play an explosion and do damage in certain radius arround it, but I don't know how this damage thing could be done without a projectile. I've looked in the manual for a command for this, but I found nothing
DamageArea(float Amount, float Range, string Attribute);
Causes the specified amount of damage to the specified attribute of all actors and models within the specified range.

DamageAtBone(float Amount, float Radius, string Attribute, string BoneName);
Causes Amount damage to all actors with the attribute Attribute around the position of the bone BoneName.
Pain is only psychological.
User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

Re: FireProjectile();

Post by metal_head »

WTF, I've never seen this before, and I was looking in the enemy section :X

amm, I gotta question:

Code: Select all

{
HEALTH [1]
HEALTHATTRIBUTE [enemy_health]


Spawn[ ()
{
Console(false);
AttributeOrder(HEALTHATTRIBUTE, HEALTH, "Death");
LowLevel('Wait');
} ]

Wait[ ()
{
if(self.health<=0)
{
AddExplosion("RocketExplosion",GetLastBoneHit(),0,0,0);
DamageArea("65", 300, "health");
DamageArea("65", 300, "enemy_health");
HighLevel("Death")
}
} ]

Death[ ();
{
Remove(true);
} ]
}
Now everything's OK

I've posted the script for the other members, it's really cool, when you have several barrels near each other, when you shoot at one of them, the others also explode! Now I gotta find a way to make a little delay before the barrels explode, so that it looks more reallistic, but I'll probably make the script switch to High level, then do a 0.1 delay and sitch to low level, where everything left will be executed. I could use Jay's timer thing, but it's too complicadet for such a simple script :D
Post Reply