|
Hyper.nl Unreal Services The forum of Hyper.nl Unreal Services and the semi-offical resource for Winged Unicorn's Unreal mods
|
View previous topic :: View next topic |
Author |
Message |
[scic]Master_proxy
Joined: 28 Nov 2005 Posts: 52 Location: Sweden
|
Posted: Thu Aug 24, 2006 4:18 pm Post subject: how to script? |
|
|
well once im done whit my help from Hyper i maybe want to learn how to script for the begin i have no idea. |
|
Back to top |
|
|
Hyper
Joined: 24 Jan 2004 Posts: 1227 Location: Middelburg, The Netherlands
|
|
Back to top |
|
|
[scic]Master_proxy
Joined: 28 Nov 2005 Posts: 52 Location: Sweden
|
Posted: Thu Aug 24, 2006 4:38 pm Post subject: |
|
|
Yeah thx oh btw i just know one thing about script is that u need to export all the classes then edit them. am i right?
Last edited by [scic]Master_proxy on Thu Apr 26, 2007 7:46 pm; edited 1 time in total |
|
Back to top |
|
|
Hyper
Joined: 24 Jan 2004 Posts: 1227 Location: Middelburg, The Netherlands
|
|
Back to top |
|
|
SoulReaver
Joined: 15 May 2004 Posts: 162
|
Posted: Thu Aug 24, 2006 7:50 pm Post subject: |
|
|
If your starting, make sure to make backups of your default .u files, it might happend to you that you save a new class into core.u, or unreali.u, if that happens. you will get version missmatch everywhere.
Regards,
-SR _________________ Before asking, try the Unreal wiki here.
------------------------------
New UT3 Community site. |
|
Back to top |
|
|
[scic]Master_proxy
Joined: 28 Nov 2005 Posts: 52 Location: Sweden
|
Posted: Fri Aug 25, 2006 3:42 pm Post subject: |
|
|
oh ok
[Edit] well ive done good the tutorial ive made my first noobie gun |
|
Back to top |
|
|
SoulReaver
Joined: 15 May 2004 Posts: 162
|
|
Back to top |
|
|
[scic]Master_proxy
Joined: 28 Nov 2005 Posts: 52 Location: Sweden
|
Posted: Fri Aug 25, 2006 8:59 pm Post subject: |
|
|
a flak cannon that shots diference projectiles(not done yet)
[edit]: how to change project tiles of the primary fire? |
|
Back to top |
|
|
Hyper
Joined: 24 Jan 2004 Posts: 1227 Location: Middelburg, The Netherlands
|
|
Back to top |
|
|
[scic]Master_proxy
Joined: 28 Nov 2005 Posts: 52 Location: Sweden
|
Posted: Sat Aug 26, 2006 8:03 am Post subject: |
|
|
I gona show u a thing Code: | function Fire( float Value )
{
local Vector Start, X,Y,Z;
//bFireMem = false;
//bAltFireMem = false;
if (AmmoType.UseAmmo(1))
{
CheckVisibility();
bPointing=True;
Start = Owner.Location + CalcDrawOffset();
if ( PlayerPawn(Owner) != None )
{
PlayerPawn(Owner).ClientInstantFlash( -0.4, vect(650, 450, 190));
PlayerPawn(Owner).ShakeView(ShakeTime, ShakeMag, ShakeVert);
}
Owner.MakeNoise(2.0 * Pawn(Owner).SoundDampening);
AdjustedAim = pawn(owner).AdjustAim(AltProjectileSpeed, Start, AimError, True, bWarnTarget);
GetAxes(AdjustedAim,X,Y,Z);
Spawn(class'WeaponLight',,'',Start+X*20,rot(0,0,0));
Start = Start + FireOffset.X * X + FireOffset.Y * Y + FireOffset.Z * Z;
Spawn( class 'MasterChunk',, '', Start, AdjustedAim);
Spawn( class 'Chunk2',, '', Start - Z, AdjustedAim);
Spawn( class 'Chunk3',, '', Start + 2 * Y + Z, AdjustedAim);
Spawn( class 'Chunk4',, '', Start - Y, AdjustedAim);
Spawn( class 'Chunk1',, '', Start + 2 * Y - Z, AdjustedAim);
Spawn( class 'Chunk2',, '', Start, AdjustedAim);
Spawn( class 'Chunk3',, '', Start + Y - Z, AdjustedAim);
Spawn( class 'Chunk4',, '', Start + 2 * Y + Z, AdjustedAim);
PlayAnim( 'Fire', 0.9, 0.05);
Owner.PlaySound(FireSound, SLOT_None,Pawn(Owner).SoundDampening*4.0);
GoToState('NormalFire');
}
}
|
this is the fire()
now this Code: | function AltFire( float Value )
{
local Vector Start, X,Y,Z;
//bFireMem = false;
//bAltFireMem = false;
if (AmmoType.UseAmmo(1))
{
CheckVisibility();
Owner.PlaySound(Misc1Sound, SLOT_None, 0.6*Pawn(Owner).SoundDampening);
Owner.PlaySound(AltFireSound, SLOT_None,Pawn(Owner).SoundDampening*4.0);
PlayAnim('AltFire', 1.3, 0.05);
bPointing=True;
Owner.MakeNoise(Pawn(Owner).SoundDampening);
GetAxes(Pawn(owner).ViewRotation,X,Y,Z);
Start = Owner.Location + CalcDrawOffset();
Spawn(class'WeaponLight',,'',Start+X*20,rot(0,0,0));
Start = Start + FireOffset.X * X + FireOffset.Y * Y + FireOffset.Z * Z;
AdjustedAim = pawn(owner).AdjustToss(AltProjectileSpeed, Start, AimError, True, bAltWarnTarget); //TIM - syntax fixme
Spawn(class'FlakShell',,, Start,AdjustedAim);
if ( PlayerPawn(Owner) != None )
{
PlayerPawn(Owner).ClientInstantFlash( -0.4, vect(650, 450, 190));
PlayerPawn(Owner).ShakeView(ShakeTime, ShakeMag, ShakeVert);
}
GoToState('AltFiring');
}
}
////////////////////////////////////////////////////////////
|
now this is not same. should it not be like altfire() as same as fire()?
wait a sec i want to hear from u hyper but i think i got it. Do i change the primary fire at the same place i change altfire? |
|
Back to top |
|
|
SoulReaver
Joined: 15 May 2004 Posts: 162
|
Posted: Sat Aug 26, 2006 12:59 pm Post subject: |
|
|
No there shouldn't be thesame, only if they have to do thesame.
I see you got that script from the Flak Cannon not?
Well, function fire spawns the projectile, and as you know, pri.fire of the flakcannon actualy fires a couple of projectiles, while altfire fires one bullet.
Hyper said a variable called ProjectileClass holds the projectile class to be spawned when firing, that is generally true. But some weapons ignore this variable and just spawn projectiles, here is a piece of the code you posted:
Code: | Spawn( class 'MasterChunk',, '', Start, AdjustedAim);
Spawn( class 'Chunk2',, '', Start - Z, AdjustedAim);
Spawn( class 'Chunk3',, '', Start + 2 * Y + Z, AdjustedAim);
Spawn( class 'Chunk4',, '', Start - Y, AdjustedAim);
Spawn( class 'Chunk1',, '', Start + 2 * Y - Z, AdjustedAim);
Spawn( class 'Chunk2',, '', Start, AdjustedAim);
Spawn( class 'Chunk3',, '', Start + Y - Z, AdjustedAim);
Spawn( class 'Chunk4',, '', Start + 2 * Y + Z, AdjustedAim);
|
As you see, it spawns a couple of classes, those classes are the actual projectiles, so if you would replace it with:
Code: |
Spawn( class 'DispersionAmmo',, '', Start - Z, AdjustedAim);
Spawn( class 'DispersionAmmo',, '', Start + 2 * Y + Z, AdjustedAim);
Spawn( class 'DispersionAmmo',, '', Start - Y, AdjustedAim);
Spawn( class 'DispersionAmmo',, '', Start + 2 * Y - Z, AdjustedAim);
Spawn( class 'DispersionAmmo',, '', Start, AdjustedAim);
Spawn( class 'DispersionAmmo',, '', Start + Y - Z, AdjustedAim);
Spawn( class 'DispersionAmmo',, '', Start + 2 * Y + Z, AdjustedAim);
|
Then it would spawn dispersion projectiles instead of the chunks.
hope this helps you, you can replace 'DispersionAmmo' by any projectile you want to have spawned there.
Regards,
-SR _________________ Before asking, try the Unreal wiki here.
------------------------------
New UT3 Community site. |
|
Back to top |
|
|
[scic]Master_proxy
Joined: 28 Nov 2005 Posts: 52 Location: Sweden
|
Posted: Sat Aug 26, 2006 2:05 pm Post subject: |
|
|
i see thx and i mean it
(edit): well its done now and i kinda like it now :P
[Edit]:the last update of my gun is finished and its ready for a test and see if u like it.
Note:dont stay in front of a wall and shot primary fire. And dont call me [Scic]Master_proxy If u gona make it public for others. Call me Master_proxy. |
|
Back to top |
|
|
SoulReaver
Joined: 15 May 2004 Posts: 162
|
|
Back to top |
|
|
[scic]Master_proxy
Joined: 28 Nov 2005 Posts: 52 Location: Sweden
|
Posted: Sat Aug 26, 2006 4:47 pm Post subject: |
|
|
i send u a package. hehe |
|
Back to top |
|
|
SoulReaver
Joined: 15 May 2004 Posts: 162
|
|
Back to top |
|
|
|
|
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
|