Hyper.nl Unreal Services Forum Index Hyper.nl Unreal Services
The forum of Hyper.nl Unreal Services and the semi-offical resource for Winged Unicorn's Unreal mods
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Really unlimited Ammo
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Hyper.nl Unreal Services Forum Index -> Projects
View previous topic :: View next topic  
Author Message
ShadowHunter
Guest





PostPosted: Thu Jul 19, 2007 11:10 am    Post subject: Really unlimited Ammo Reply with quote

Seems my question about scanner functions will never be answered.
So I've got another question...
Somebody know how to make weapons that doesnt uses ammo?It's not fast recharging ammo (kinda upgraded DefaultAmmo).Place where usually drawed icon with AmmoIcon and AmmoAmount are empty.
Back to top
mental-HunteR



Joined: 05 May 2006
Posts: 363
Location: The Netherlands

PostPosted: Fri Jul 20, 2007 11:17 am    Post subject: Reply with quote

Uhm, i for example the Flakcannon. You can just remove the useammo(1) function at both fire functions.
_________________
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
ShadowHunter
Guest





PostPosted: Sat Jul 21, 2007 7:58 am    Post subject: Reply with quote

Hmm...Really - I tried.After that weapon made one shot and after that you can only throw it away.But i'l try again maybe I did someth wrong.
But anyway thanks for advice.
Back to top
TheGuyWhoGotOn



Joined: 21 Nov 2006
Posts: 40

PostPosted: Thu Aug 30, 2007 10:19 pm    Post subject: Reply with quote

ShadowHunter wrote:
Hmm...Really - I tried.After that weapon made one shot and after that you can only throw it away.But i'l try again maybe I did someth wrong.
But anyway thanks for advice.


I did it to almost all the guns once...I just don't remember how, sorry.
Back to top
View user's profile Send private message Send e-mail
Bleeder91



Joined: 28 Sep 2006
Posts: 265

PostPosted: Wed Sep 05, 2007 6:13 pm    Post subject: Reply with quote

infinite ammo...
DONT'S: useammo(0), example: stinger will only shoot 1 proj in altfire with this;
DO's: open Weapon class script, search fire function fire and altfire, copy all, thenh delete
if( UseAmmo(1) )
{
//dont delete the middle if you were thinking that...
}
easy way:
example: make a class like'InfinWep' or something like that, then past the new functions fire and altfire in it, then make the new weps a subclass of this one. if it will be stinger-like, just copy stinger script(or other weapon), then look in that script for fire and altfire. if it is there, delete the if(useammo) part.
that should do it
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mental-HunteR



Joined: 05 May 2006
Posts: 363
Location: The Netherlands

PostPosted: Wed Sep 05, 2007 8:18 pm    Post subject: Reply with quote

Bleeder91 wrote:
infinite ammo...
DONT'S: useammo(0), example: stinger will only shoot 1 proj in altfire with this;
DO's: open Weapon class script, search fire function fire and altfire, copy all, thenh delete
if( UseAmmo(1) )
{
//dont delete the middle if you were thinking that...
}
easy way:
example: make a class like'InfinWep' or something like that, then past the new functions fire and altfire in it, then make the new weps a subclass of this one. if it will be stinger-like, just copy stinger script(or other weapon), then look in that script for fire and altfire. if it is there, delete the if(useammo) part.
that should do it


The first thing you said isnt rally correct, You need to define it good. You proberly just changed it to useammo 0 or so. I define it and it works..
_________________
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Bleeder91



Joined: 28 Sep 2006
Posts: 265

PostPosted: Thu Sep 20, 2007 5:50 pm    Post subject: Reply with quote

useammo(0), try that for stinger's altfire inside the for(): it'll only shoot 1 proj then
Back to top
View user's profile Send private message Send e-mail Visit poster's website
.:..:



Joined: 30 Nov 2004
Posts: 11
Location: Finland

PostPosted: Thu Sep 20, 2007 8:48 pm    Post subject: Reply with quote

Another very simple way is to create a new ammo class and put this code in:
Code:

function bool UseAmmo(int AmountNeeded)
{
   return True;
}


Then change every weapon's ammoname to that, which can easly be done with a mutator:
Code:

function bool CheckReplacement(Actor Other, out byte bSuperRelevant)
{
   if( Weapon(Other)!=None && Weapon(Other).AmmoName!=None )
      Weapon(Other).AmmoName = Class'MyAmmoClass';
   return true;
}
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Bleeder91



Joined: 28 Sep 2006
Posts: 265

PostPosted: Sat Sep 22, 2007 5:29 pm    Post subject: Reply with quote

hmmpf.. dots gotta own us all, only my way is simpler dots's way needs mutator XD
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ShadowHunter
Guest





PostPosted: Tue Sep 25, 2007 4:09 pm    Post subject: Reply with quote

Once i asked Ageukkely.He said same thing like Bleeder91 recommended to me:make new subclass of class weapons,copy there code from main class and delete all about ammo.Than make there new weapons and delete function if(UseAmmo(1)).But after that i've got another problem:
Weapons wont switch with numbers,only by wheel.If i hit some number with weapon it said that this weapon Have no ammo.

I didn't tried Bleeder91's way....Hope it will work correctly...

Ty Bleeder.
Back to top
Bleeder91



Joined: 28 Sep 2006
Posts: 265

PostPosted: Wed Sep 26, 2007 6:09 pm    Post subject: Reply with quote

np, if there still are any problems then mail me: .bleeder91.@hotmail.com
(without the two dots)
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ShadowHunter
Guest





PostPosted: Sat Sep 29, 2007 8:37 am    Post subject: Reply with quote

Well,thankyou Bleeder.That thing worked.I found what mistake did i made:I deleted EVERYTHING that concemed ammo.
Back to top
Killer_Skaarj



Joined: 01 Aug 2007
Posts: 8

PostPosted: Thu Jan 31, 2008 12:53 am    Post subject: Reply with quote

Alright, now that you guys solved his problem, can you solve mine? It's kinda similar, as it has to to with unlimited ammo.

How do I make the Stinger have unlimited ammo for primary fire but limited ammo for alt fire? In other words, the alt fire wastes ammo, but the primary fire doesn't.

Can anyone help me out?

EDIT: Dang, wrong account...
_________________
I was K죣èr_§kā&#, until it got deactivated.
Back to top
View user's profile Send private message Send e-mail
ShadowHunter
Guest





PostPosted: Sat Feb 02, 2008 11:26 am    Post subject: Reply with quote

Hmm...I'l think about this problem.
But...Try this...

Delete from primary fire string like :
if(AmmoType.UseAmmo(1)

and leave samee string in alt fire.
Back to top
Bleeder91



Joined: 28 Sep 2006
Posts: 265

PostPosted: Sat Feb 02, 2008 1:31 pm    Post subject: Reply with quote

stinger's altfire. many ppl have problems with that yeah, tho it is very easy to fix. just look very carefully, here:
Code:

state AltFiring
{
   function Projectile ProjectileFire(class<projectile> ProjClass, float ProjSpeed, bool bWarn)
   {
      local Projectile S;
      local int i;
      local vector Start,X,Y,Z;
      local Rotator StartRot, AltRotation;

      S = Global.ProjectileFire(ProjClass, ProjSpeed, bWarn);
      StartRot = S.Rotation;
      Start = S.Location;
      for (i = 0; i< 4; i++)
      {
         if (AmmoType.UseAmmo(1))
         {
            AltRotation = StartRot;
            AltRotation.Pitch += FRand()*3000-1500;
            AltRotation.Yaw += FRand()*3000-1500;
            AltRotation.Roll += FRand()*9000-4500;            
            S = Spawn(AltProjectileClass,,, Start - 2 * VRand(), AltRotation);
         }
      }
      StingerProjectile(S).bLighting = True;
   }

Begin:
   FinishAnim();   
   PlayAnim('Still');
   Sleep(1.0);
   Finish();         
}


Now take a look at this piece:

Code:

state AltFiring
{
   function Projectile ProjectileFire(class<projectile> ProjClass, float ProjSpeed, bool bWarn)
   {
      local Projectile S;
      local int i;
      local vector Start,X,Y,Z;
      local Rotator StartRot, AltRotation;

      S = Global.ProjectileFire(ProjClass, ProjSpeed, bWarn);
      StartRot = S.Rotation;
      Start = S.Location;
      for (i = 0; i< 4; i++)
      {
         AltRotation = StartRot;
         AltRotation.Pitch += FRand()*3000-1500;
         AltRotation.Yaw += FRand()*3000-1500;
         AltRotation.Roll += FRand()*9000-4500;   
         S = Spawn(AltProjectileClass,,, Start - 2 * VRand(), AltRotation);
      }
      StingerProjectile(S).bLighting = True;
   }

Begin:
   FinishAnim();   
   PlayAnim('Still');
   Sleep(1.0);
   Finish();         
}


almost the same as primary fire, just delete the useammo piece, that should do it!
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Hyper.nl Unreal Services Forum Index -> Projects All times are GMT + 1 Hour
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group