Page 1 of 1

keys

PostPosted: Sun Aug 20, 06 3:09 pm
by ICE
how would I like assign something to keys like if I were to press the zoom button using a weapon but I wont zoom ill i dunno I shoot a alternitive fire like shooting a genade.

PostPosted: Sun Aug 20, 06 8:44 pm
by Professor Layton
I don't get what you exactly mean =\

PostPosted: Sun Aug 20, 06 8:46 pm
by ICE
that doesnt awnser my question. :roll:

PostPosted: Sun Aug 20, 06 8:48 pm
by Professor Layton
Then rephrase. Your question does not make much sense to me, I tried to understand it, but I didn't I reckon.

PostPosted: Sun Aug 20, 06 9:09 pm
by Allan
This may be of a bit of help, if by what you mean is make a weapon's scope do something else(Like make it change a weapons fire-speed, etc...)

Code: Select all
replication
{
   If(Role<ROLE_Authority)
      ScopeOnAltfireSettings, ScopeOffDefaultSettings;
}

simulated function PreBeginPlay()
{} // This will over-ride the PreBeginPlay defaults set out in the parent versions of this class

simulated function WeaponSelected(DeusExPlayer Player)
{
   Player=DeusExPlayer(Owner);
   if(Player!=None)
   {
      Player.ClientMessage("This weapon has 2 fire modes. Press your Scope key to switch between them.");
   }
}

simulated function RefreshScopeDisplay(DeusExPlayer player, bool bInstant, bool bScopeOn)
{
   Player=DeusExPlayer(Owner);
   if(bScopeOn && (Player !=None))
   {
      ScopeOnAltfireSettings(player);
   }
   else if (!bScopeOn)
   {
      ScopeOffDefaultSettings(player);
   }
}

Function ScopeOnAitfireSettings(deusExPlayer P)
{
   P=DeusExPlayer(Owner);
   if(P!=None)
   {
      //Put whatever shizz you want settings wise for the altfire mode
   }
}

Function ScopeOnAitfireSettings(deusExPlayer P)
{
   P=DeusExPlayer(Owner);
   if(P!=None)
   {
      //Put whatever your gun's non-altfire settings are (Can be found in defaultProperties)
   }
}


I'm not 100% if this'll work, but it's the best I can think of ATM.

edit: 1000 posties! Win-omg-pwnage!

PostPosted: Sun Aug 20, 06 9:25 pm
by ICE
hey thx allan

PostPosted: Mon Aug 21, 06 1:01 pm
by clyzm
Also, the animation would have to be something like Fire2, and you would have to code it so when you press left bracket key, it activates that sequence.

PostPosted: Tue Sep 11, 07 2:53 am
by Raiiiny
its really simple...
just paste this above your default properties
An Change the things i highlighted in cyan
although this is the laser toggle button so you can
still use your scope :mexicanrasta:

simulated function SetMode()
{
local projectileClassHere wOOt;
local DeusExPlayer Player;
player = DeusExPlayer(Owner);

wOOt = Spawn(Class'yourmodhere.Projectileclasshere',Player,,Player.Location,Player.ViewRotation);
}

Simulated function LaserToggle()
{
SetMode();
}