Page 1 of 1

FireProjectile();

Posted: Tue Apr 21, 2009 3:54 pm
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...

Re: FireProjectile();

Posted: Tue Apr 21, 2009 7:12 pm
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.

Re: FireProjectile();

Posted: Tue Apr 21, 2009 8:35 pm
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)

Re: FireProjectile();

Posted: Fri May 15, 2009 12:37 pm
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.

Re: FireProjectile();

Posted: Fri May 15, 2009 2:08 pm
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 :)

Re: FireProjectile();

Posted: Fri May 15, 2009 2:34 pm
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.

Re: FireProjectile();

Posted: Fri May 15, 2009 3:00 pm
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