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 

how to script?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Hyper.nl Unreal Services Forum Index -> HelpDesk
View previous topic :: View next topic  
Author Message
[scic]Master_proxy



Joined: 28 Nov 2005
Posts: 52
Location: Sweden

PostPosted: Thu Aug 24, 2006 4:18 pm    Post subject: how to script? Reply with quote

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
View user's profile Send private message Visit poster's website
Hyper



Joined: 24 Jan 2004
Posts: 1227
Location: Middelburg, The Netherlands

PostPosted: Thu Aug 24, 2006 4:33 pm    Post subject: Reply with quote

Scripting is not really my business, but you might want to take a look here:

http://www.oldunreal.com/editing.html
http://wiki.beyondunreal.com/wiki/

It can also be useful to be able to take a look at the original Unreal sources, which can be viewed at the UnrealBase section of my main page.
_________________
Alter your reality...forever.
Hyper.nl Unreal Services
unreal://hypercoop.tk
Back to top
View user's profile Send private message Visit poster's website
[scic]Master_proxy



Joined: 28 Nov 2005
Posts: 52
Location: Sweden

PostPosted: Thu Aug 24, 2006 4:38 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Hyper



Joined: 24 Jan 2004
Posts: 1227
Location: Middelburg, The Netherlands

PostPosted: Thu Aug 24, 2006 6:01 pm    Post subject: Reply with quote

No, you indeed have to export all classes, but never edit them!

Instead, make a new class that extends the class that you want to edit.

If you want to make a weapon, this site might help as well:
http://www.planetunreal.com/wod/tutorials/
_________________
Alter your reality...forever.
Hyper.nl Unreal Services
unreal://hypercoop.tk
Back to top
View user's profile Send private message Visit poster's website
SoulReaver



Joined: 15 May 2004
Posts: 162

PostPosted: Thu Aug 24, 2006 7:50 pm    Post subject: Reply with quote

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
View user's profile Send private message
[scic]Master_proxy



Joined: 28 Nov 2005
Posts: 52
Location: Sweden

PostPosted: Fri Aug 25, 2006 3:42 pm    Post subject: Reply with quote

oh ok


[Edit] well ive done good the tutorial ive made my first noobie gun
Back to top
View user's profile Send private message Visit poster's website
SoulReaver



Joined: 15 May 2004
Posts: 162

PostPosted: Fri Aug 25, 2006 7:47 pm    Post subject: Reply with quote

Nice lol, what did you made?
_________________
Before asking, try the Unreal wiki here.
------------------------------
New UT3 Community site.
Back to top
View user's profile Send private message
[scic]Master_proxy



Joined: 28 Nov 2005
Posts: 52
Location: Sweden

PostPosted: Fri Aug 25, 2006 8:59 pm    Post subject: Reply with quote

a flak cannon that shots diference projectiles(not done yet)


[edit]: how to change project tiles of the primary fire?
Back to top
View user's profile Send private message Visit poster's website
Hyper



Joined: 24 Jan 2004
Posts: 1227
Location: Middelburg, The Netherlands

PostPosted: Sat Aug 26, 2006 12:07 am    Post subject: Reply with quote

As you can read in the UnrealScript documentation each weapon has a variable called ProjectileClass and AltProjectileClass which hold the class name of the projectile that it shoots.
_________________
Alter your reality...forever.
Hyper.nl Unreal Services
unreal://hypercoop.tk
Back to top
View user's profile Send private message Visit poster's website
[scic]Master_proxy



Joined: 28 Nov 2005
Posts: 52
Location: Sweden

PostPosted: Sat Aug 26, 2006 8:03 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
SoulReaver



Joined: 15 May 2004
Posts: 162

PostPosted: Sat Aug 26, 2006 12:59 pm    Post subject: Reply with quote

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
View user's profile Send private message
[scic]Master_proxy



Joined: 28 Nov 2005
Posts: 52
Location: Sweden

PostPosted: Sat Aug 26, 2006 2:05 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
SoulReaver



Joined: 15 May 2004
Posts: 162

PostPosted: Sat Aug 26, 2006 4:45 pm    Post subject: Reply with quote

How can i try it? lol
_________________
Before asking, try the Unreal wiki here.
------------------------------
New UT3 Community site.
Back to top
View user's profile Send private message
[scic]Master_proxy



Joined: 28 Nov 2005
Posts: 52
Location: Sweden

PostPosted: Sat Aug 26, 2006 4:47 pm    Post subject: Reply with quote

i send u a package. hehe
Back to top
View user's profile Send private message Visit poster's website
SoulReaver



Joined: 15 May 2004
Posts: 162

PostPosted: Sat Aug 26, 2006 4:49 pm    Post subject: Reply with quote

where?
_________________
Before asking, try the Unreal wiki here.
------------------------------
New UT3 Community site.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Hyper.nl Unreal Services Forum Index -> HelpDesk 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