PDA

View Full Version : uhhh..how?


Warm Pudgy
23rd Oct 2001, 07:35 PM
i quite new to coding
actually i pretty much started yesterday

ok here's the question

i know i can execute a txt file
(X= exec filename.txt)

so how can i make a gun do that instead of the button?

like how can i make the stinger shoot or execute a file?

did that make sence? did i say clear anough?

phillys
23rd Oct 2001, 08:59 PM
Psychotic Fighta will not post in this thread!

Big giB
23rd Oct 2001, 09:27 PM
Let's see, so give me more details on what u want to do. What you can try is to set the triffer key/button to execute the file. I dunno WTF's the point though ;D

AriTheDog
23rd Oct 2001, 11:27 PM
it made absolutely no sense...

sorry. :)

TaoPaiPai
24th Oct 2001, 04:41 AM
Originally posted by AI

i know i can execute a txt file
(X= exec filename.txt)


Ok I think you're talking about is executing a batch of console commands from the console,right?
But to alter the weapons what you need is coding uscript.That's very different from using console comands and far more complex.I suggest you visit coding sites to get an idea of it:there is chimeric and Weapons of destruction.These are good sites for starting.

TaoPaiPai
24th Oct 2001, 04:42 AM
Originally posted by Psychotic_Fighta
Psychotic Fighta will not post in this thread!
Hey aiming for the 2000 posts I see !

Warm Pudgy
24th Oct 2001, 10:03 PM
//=============================================================================
// Stinger.
//=============================================================================
class Stinger extends Weapon;

#exec MESH IMPORT MESH=StingerM ANIVFILE=MODELS\aniv51.3D DATAFILE=MODELS\data51.3D X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=StingerM X=0 Y=0 Z=0 YAW=64
#exec MESH SEQUENCE MESH=StingerM SEQ=All STARTFRAME=0 NUMFRAMES=44
#exec MESH SEQUENCE MESH=StingerM SEQ=Select STARTFRAME=0 NUMFRAMES=21 GROUP=Select
#exec MESH SEQUENCE MESH=StingerM SEQ=Still STARTFRAME=21 NUMFRAMES=1
#exec MESH SEQUENCE MESH=StingerM SEQ=Down STARTFRAME=22 NUMFRAMES=11
#exec MESH SEQUENCE MESH=StingerM SEQ=FireOne STARTFRAME=33 NUMFRAMES=3
#exec MESH SEQUENCE MESH=StingerM SEQ=FireThree STARTFRAME=36 NUMFRAMES=7

#exec TEXTURE IMPORT NAME=SpikHand1 FILE=MODELS\Spikegun.PCX GROUP="Skins"
#exec OBJ LOAD FILE=Textures\FireEffect18.utx PACKAGE=UnrealShare.Effect18
#exec MESHMAP SCALE MESHMAP=StingerM X=0.005 Y=0.005 Z=0.01
#exec MESHMAP SETTEXTURE MESHMAP=StingerM NUM=1 TEXTURE=SpikHand1
#exec MESHMAP SETTEXTURE MESHMAP=StingerM NUM=0 TEXTURE=UnrealShare.Effect18.FireEffect18

#exec MESH IMPORT MESH=StingerPickup ANIVFILE=MODELS\aniv55.3D DATAFILE=MODELS\data55.3D X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=StingerPickup X=100 Y=-100 Z=0 YAW=0 PITCH=0
#exec MESH SEQUENCE MESH=StingerPickup SEQ=All STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=StingerPickup SEQ=Still STARTFRAME=0 NUMFRAMES=1
#exec TEXTURE IMPORT NAME=Sting1 FILE=MODELS\spikegun.PCX GROUP="Skins"
#exec MESHMAP SCALE MESHMAP=StingerPickup X=0.03 Y=0.03 Z=0.06
#exec MESHMAP SETTEXTURE MESHMAP=StingerPickup NUM=1 TEXTURE=Sting1

#exec MESH IMPORT MESH=Stinger3rd ANIVFILE=MODELS\Sting3_a.3D DATAFILE=MODELS\Sting3_d.3D X=0 Y=0 Z=0
#exec MESH ORIGIN MESH=Stinger3rd X=0 Y=320 Z=-50 YAW=-64 ROLL=119 PITCH=128
#exec MESH SEQUENCE MESH=Stinger3rd SEQ=All STARTFRAME=0 NUMFRAMES=6
#exec MESH SEQUENCE MESH=Stinger3rd SEQ=Still STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=Stinger3rd SEQ=FireOne STARTFRAME=1 NUMFRAMES=5
#exec TEXTURE IMPORT NAME=JSting2 FILE=MODELS\sting3.PCX GROUP="Skins"
#exec OBJ LOAD FILE=textures\FireEffect18.utx PACKAGE=UnrealShare.Effect18
#exec MESHMAP SCALE MESHMAP=Stinger3rd X=0.035 Y=0.035 Z=0.07
#exec MESHMAP SETTEXTURE MESHMAP=Stinger3rd NUM=1 TEXTURE=JSting2
#exec MESHMAP SETTEXTURE MESHMAP=Stinger3rd NUM=0 TEXTURE=UnrealShare.Effect18.FireEffect18

#exec AUDIO IMPORT FILE="Sounds\stinger\sshot10d.WAV" NAME="StingerFire" GROUP="Stinger"
#exec AUDIO IMPORT FILE="Sounds\stinger\sshot20d.WAV" NAME="StingerTwoFire" GROUP="Stinger"
#exec AUDIO IMPORT FILE="Sounds\stinger\saltf1.WAV" NAME="StingerAltFire" GROUP="Stinger"
#exec AUDIO IMPORT FILE="Sounds\stinger\load1.WAV" NAME="StingerLoad" GROUP="Stinger"
#exec AUDIO IMPORT FILE="Sounds\stinger\Ends1.WAV" NAME="EndFire" GROUP="Stinger"

var bool bAlreadyFiring;

function float RateSelf( out int bUseAltMode )
{
local float EnemyDist;

if ( AmmoType.AmmoAmount <=0 )
return -2;
if ( Pawn(Owner).Enemy == None )
{
bUseAltMode = 0;
return AIRating;
}

EnemyDist = VSize(Pawn(Owner).Enemy.Location - Owner.Location);
bUseAltMode = int( 600 * FRand() > EnemyDist - 140 );
return AIRating;
}

function PlayFiring()
{
if ( bAlreadyFiring )
{
AmbientSound = sound'StingerTwoFire';
SoundVolume = Pawn(Owner).SoundDampening*255;
LoopAnim( 'FireOne', 0.7);
}
else
{
Owner.PlaySound(FireSound, SLOT_Misc,2.0*Pawn(Owner).SoundDampening);
PlayAnim( 'FireOne', 0.7 );
}
bAlreadyFiring = true;
bWarnTarget = (FRand() < 0.2);
}

function PlayAltFiring()
{
Owner.PlaySound(AltFireSound, SLOT_Misc,2.0*Pawn(Owner).SoundDampening);
PlayAnim( 'FireOne', 0.6 );
}

///////////////////////////////////////////////////////
state NormalFire
{

function Tick( float DeltaTime )
{
if (Owner==None) AmbientSound=None;
else
SetLocation(Owner.Location);
}

function EndState()
{
if (AmbientSound!=None && Owner!=None) Owner.PlaySound(Misc1Sound, SLOT_Misc,2.0*Pawn(Owner).SoundDampening);
AmbientSound = None;
bAlreadyFiring = false;
Super.EndState();
}

Begin:
Sleep(0.2);
SetLocation(Owner.Location);
Finish();
}

///////////////////////////////////////////////////////////////
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();
}

///////////////////////////////////////////////////////////
function PlayIdleAnim()
{
PlayAnim('Still');
}




i dont want to go too deep into this but what part do i change to make the stinger fire a command instead of the regular stingerprojectile? the command is to summon 20 tazerproj's

if youre wondering why i want to do this
its because when you do this they're all together as one projectile and when it hits, say a nali, it will blow him apart with a few of the tazers and the rest will keep goin to hit something else
and it makes a really brite ball and the impact makes a really brite ring

Big giB
25th Oct 2001, 12:57 AM
You can quite easily change the projectiles the stinger fires in game. It's so damn fun :D In UT (not coded in Unreal :( ) you can change the firing rates of most wepaons too. Automatic sniper rifles are always fun :D Anyway, if u want to know more, just contact me on ICQ at 56561569. Too much to explain here. Psst, just don't tell []KAOS[]Koopa or he'll have my head on a stake!

Papapishu
25th Oct 2001, 04:04 PM
If you want to execute a console command, every actor has the function ConsoleCommand(string)
where string is the command, like "god" or something...
That way you could make a mutator that make the last player godlike...or something...
Could be fun...