View previous topic :: View next topic |
Author |
Message |
9svn6
Joined: 30 Jun 2007 Posts: 12 Location: Brockport, NY
|
Posted: Sun Jul 01, 2007 5:57 am Post subject: Adding a ranged attack? |
|
|
Ok next up I'd like to find out how to add a ranged attack to a pawn that doesn't originally have one. Like A pupae or manta. Someone was telling me you have to add some code has anyone already done this and want to share it? |
|
Back to top |
|
|
ShadowHunter Guest
|
Posted: Sun Jul 01, 2007 4:12 pm Post subject: |
|
|
In default properties found flag "Combat".Here you'l find options bHasRangedProjectile , RangedProjectile etc.Use those options.If still dont work, search for needed scripts in ScriptedPawn classes who can shoot with projectile. |
|
Back to top |
|
|
9svn6
Joined: 30 Jun 2007 Posts: 12 Location: Brockport, NY
|
Posted: Mon Jul 02, 2007 12:04 am Post subject: |
|
|
yup it needs code already new that heh, someone sent me some so i'm trying it now so far no luck tho. |
|
Back to top |
|
|
mental-HunteR
Joined: 05 May 2006 Posts: 363 Location: The Netherlands
|
Posted: Mon Jul 02, 2007 7:08 pm Post subject: |
|
|
Am i that person? _________________
|
|
Back to top |
|
|
9svn6
Joined: 30 Jun 2007 Posts: 12 Location: Brockport, NY
|
Posted: Mon Jul 02, 2007 11:25 pm Post subject: |
|
|
Yup, but I'm having problems with it, it seems to be shooting itself lol or the ground in front of it. |
|
Back to top |
|
|
mental-HunteR
Joined: 05 May 2006 Posts: 363 Location: The Netherlands
|
Posted: Tue Jul 03, 2007 12:42 pm Post subject: |
|
|
BTW, did you took a look at that berserkpack mod sources i send to you?? _________________
|
|
Back to top |
|
|
Cheese
Joined: 30 Mar 2006 Posts: 79 Location: ...YES
|
Posted: Wed Jul 04, 2007 6:51 pm Post subject: |
|
|
Code: |
function PlayRangedAttack()
{
local vector projStart;
local vector adjust;
adjust = vect(0,0,0);
adjust.Z = Target.CollisionHeight + 20;
Acceleration = AccelRate * Normal(Target.Location - Location + adjust);
projStart = Location - 0.5 * CollisionHeight * vect(0,0,1);
spawn(RangedProjectile ,self,'',projStart,AdjustAim(ProjectileSpeed, projStart, 400, false, false));
}
defaultproperties
{
bHasRangedAttack=True
}
|
Now just make the monster play whatever firing animation it has, and set the ranged projectile. _________________
|
|
Back to top |
|
|
mental-HunteR
Joined: 05 May 2006 Posts: 363 Location: The Netherlands
|
Posted: Thu Jul 05, 2007 2:51 pm Post subject: |
|
|
Thats EXACTLY the same thing i posted at anarchys Forum. Btw is that upakguns that file you send to em for my server? when i still had one. _________________
|
|
Back to top |
|
|
Cheese
Joined: 30 Mar 2006 Posts: 79 Location: ...YES
|
Posted: Sat Jul 07, 2007 5:41 am Post subject: |
|
|
Yes, UpakGuns is that same package.
Quote: |
Thats EXACTLY the same thing i posted at anarchys Forum.
|
Hmm, I never saw that at anarchy's forum. Meh. _________________
|
|
Back to top |
|
|
mental-HunteR
Joined: 05 May 2006 Posts: 363 Location: The Netherlands
|
Posted: Sat Jul 07, 2007 10:56 am Post subject: |
|
|
Doh! The first part wasnt from Anarchy's forum hehe. _________________
|
|
Back to top |
|
|
9svn6
Joined: 30 Jun 2007 Posts: 12 Location: Brockport, NY
|
Posted: Sat Jul 14, 2007 7:53 pm Post subject: |
|
|
Ok I tried that code for the fly but it doesent fly around it walks on the ground? |
|
Back to top |
|
|
9svn6
Joined: 30 Jun 2007 Posts: 12 Location: Brockport, NY
|
Posted: Tue Jul 17, 2007 9:38 am Post subject: |
|
|
hey guys it turns out if does work not sure why that particular time it didn't choose to fly lol. |
|
Back to top |
|
|
|