Learn UScript.

The best and quickest support by a group of top-notch editing specialists, guaranteed!

Moderator: Forum Guards

Learn UScript.

Postby Cozmo » Mon Mar 13, 06 10:52 pm

I want to learn UnrealScript.
People say open Deusex.u and look around to learn but that hasnt helped me much, ive gone on UnrealWiki and i get bombared with scripts - can someone reccomend a good place to start?
Cozmo_RPG (v1 & v2)
MPConversations - A tool for creating multiplayer RPG stuff
Cozmo
Master
 
Posts: 1266
Joined: Tue Jun 28, 05 10:53 am
Location: UK

Postby MainMan » Mon Mar 13, 06 11:00 pm

I really recommend decompiling deusex.u, it is very hepful. To start with, look at some default properties, then try weapon editing, gradually getting more advanced.

Personally, I never found unrealWiki helpful. Maybe I'm just dumb, but like you said, whenever i go on, I get bombarded with information and it's not really that helpful. I'd much rathe be shown the code and learn how it works (from a ready script) than learn about the principles on a website.
<center>ty m7
</center>
User avatar
MainMan
<i>Tru' Playa' Fer Defs</i>
 
Posts: 4655
Joined: Sun Jun 05, 05 7:38 am
Location: London, UK

Postby Alex » Tue Mar 14, 06 2:50 pm

~MainMan~ wrote:I really recommend decompiling deusex.u, it is very hepful. To start with, look at some default properties, then try weapon editing, gradually getting more advanced.

Personally, I never found unrealWiki helpful. Maybe I'm just dumb, but like you said, whenever i go on, I get bombarded with information and it's not really that helpful. I'd much rathe be shown the code and learn how it works (from a ready script) than learn about the principles on a website.

unrealWiki is only handy if you need to know something about a specific function, but in your case, just look at things like Switch1.uc or SodaCan.uc, you know what it does, so you can find out how it works.
Alex
Alpha
 
Posts: 8067
Joined: Wed Nov 12, 03 4:51 pm

Postby Cozmo » Tue Mar 14, 06 4:56 pm

I think ive mastered defaultproperties. :D
Decompile Deusex.u
But i just have not learned much from this, i can read a basic script and have a vauge idea what it does but that's it.
:(
Cozmo_RPG (v1 & v2)
MPConversations - A tool for creating multiplayer RPG stuff
Cozmo
Master
 
Posts: 1266
Joined: Tue Jun 28, 05 10:53 am
Location: UK

Postby Alex » Tue Mar 14, 06 4:58 pm

~Cozmo~ wrote:I think ive mastered defaultproperties. :D
Decompile Deusex.u
But i just have not learned much from this, i can read a basic script and have a vauge idea what it does but that's it.
:(

That's it?
That is a huge start! You know more then 99% of the whole Deus Ex community now.
Alex
Alpha
 
Posts: 8067
Joined: Wed Nov 12, 03 4:51 pm

Postby Dae » Tue Mar 14, 06 5:00 pm

I recommend you to set a task for yourself and do your best to complete it. I learned a lot of things this way :)
User avatar
Dae
Alpha
 
Posts: 12086
Joined: Sat Sep 06, 03 4:40 pm

Postby Siva » Tue Mar 14, 06 5:07 pm

Ya, I set a stupidly large task to do, But I am fscking doing it anyway, even though it will be completed when DX3 is released.
//..
User avatar
Siva
doesn't care about augmented people
 
Posts: 6757
Joined: Tue Dec 06, 05 4:56 pm

Postby Cozmo » Tue Mar 14, 06 5:12 pm

From what ive heard, there will be no DX:3.
:(
Cozmo_RPG (v1 & v2)
MPConversations - A tool for creating multiplayer RPG stuff
Cozmo
Master
 
Posts: 1266
Joined: Tue Jun 28, 05 10:53 am
Location: UK

Postby Siva » Tue Mar 14, 06 5:15 pm

~Cozmo~ wrote:From what ive heard, there will be no DX:3.
:(


*cough* Thats my point *cough*
//..
User avatar
Siva
doesn't care about augmented people
 
Posts: 6757
Joined: Tue Dec 06, 05 4:56 pm

Postby Ballistix » Tue Mar 14, 06 5:17 pm

~Cozmo~ wrote:From what ive heard, there will be no DX:3.
:(


Well if it was anything like DX:2 (which im 97% positive it will be) who gives a fuck.
User avatar
Ballistix
Member title-less
 
Posts: 392
Joined: Wed Dec 28, 05 12:13 am

Postby Dae » Tue Mar 14, 06 5:31 pm

~Cozmo~ wrote:From what ive heard, there will be no DX:3.
:(

That was a sarcasm :)
User avatar
Dae
Alpha
 
Posts: 12086
Joined: Sat Sep 06, 03 4:40 pm

Postby Cozmo » Tue Mar 14, 06 5:33 pm

While im here i might as well ask a question. :)
After opening DeusExWeapon i figured defaultproperties are all just variables (Hope im right)
I dont realy need this but i just want to edit this as an example.
To prove my theory i wana make it that i can change the heal ammount of a sodacan in defaults but it dosent work :? Dont laugh if theres some easy mistake this is my first attempt at anything thats not default noobing :) .

Code: Select all
//=============================================================================
// Sodacan.
//=============================================================================
class SodacanB extends SodaCan

Var Float HealA

state Activated
{
   function Activate()
   {
      // can't turn it off
   }

   function BeginState()
   {
      local DeusExPlayer player;
      
      Super.BeginState();

      player = DeusExPlayer(Owner);
      if (player != None)
         player.HealPlayer(HealA, False);

      PlaySound(sound'MaleBurp');
      UseOnce();
   }
Begin:
}

defaultproperties
{
     HealA=5
}
Cozmo_RPG (v1 & v2)
MPConversations - A tool for creating multiplayer RPG stuff
Cozmo
Master
 
Posts: 1266
Joined: Tue Jun 28, 05 10:53 am
Location: UK

Postby MainMan » Tue Mar 14, 06 5:37 pm

Hmm i dunno what's wrong with that... Maybe change var float at the top to var int (int = integer (whole number), float = a number with 6 decimal places after it.)
<center>ty m7
</center>
User avatar
MainMan
<i>Tru' Playa' Fer Defs</i>
 
Posts: 4655
Joined: Sun Jun 05, 05 7:38 am
Location: London, UK

Postby Dae » Tue Mar 14, 06 5:41 pm

Var Float HealA

change to
var int heala;

As MainMan already said, the variable should be integer and don't forget about semicolons in the end.

Oh and yeah, noone will laugh at those, who try to learn something.
User avatar
Dae
Alpha
 
Posts: 12086
Joined: Sat Sep 06, 03 4:40 pm

Postby Cozmo » Tue Mar 14, 06 5:49 pm

Ah i forgot to put ; before State that was main problem...
ZOMG It works! :D
Ive taken a small step towards coding, now i know variables are default stuff :)
Cozmo_RPG (v1 & v2)
MPConversations - A tool for creating multiplayer RPG stuff
Cozmo
Master
 
Posts: 1266
Joined: Tue Jun 28, 05 10:53 am
Location: UK

Postby Siva » Tue Mar 14, 06 9:08 pm

I have recently followed in cosmo's footsteps :O !11!oneone!1.

Learned all I think I need for a while from defaultpros of DeusEx.U
//..
User avatar
Siva
doesn't care about augmented people
 
Posts: 6757
Joined: Tue Dec 06, 05 4:56 pm

Postby Cozmo » Tue Mar 14, 06 9:12 pm

AAAGH!!!!
IT HAS A Z NOT A S!
Cozmo!
Cozmo_RPG (v1 & v2)
MPConversations - A tool for creating multiplayer RPG stuff
Cozmo
Master
 
Posts: 1266
Joined: Tue Jun 28, 05 10:53 am
Location: UK

Postby Siva » Wed Mar 15, 06 10:07 am

Haha, your cosmo the womens magazine XD.
//..
User avatar
Siva
doesn't care about augmented people
 
Posts: 6757
Joined: Tue Dec 06, 05 4:56 pm

Postby Rödewijk » Wed Mar 15, 06 4:21 pm

cosmo Image
Rödewijk
Master
 
Posts: 1028
Joined: Tue Jun 28, 05 10:40 am

Postby Allan » Wed Mar 15, 06 5:23 pm

Right, Trying to get back on topic... :P

Cozmo's Code wrote: function BeginState()
{
local DeusExPlayer player;

Super.BeginState();

player = DeusExPlayer(Owner);
if (player != None)
player.HealPlayer(HealA, False);

PlaySound(sound'MaleBurp');
UseOnce();
}


Right, the bit in bold (Super.BeginState), means that it loads up the version of BeginState from SodaCan, aswell as what you have there. So, try getting 2 of your custom sodacans, and see what happens :)

If i guess, it will use 2 at once, and heal 2 with one, and however much you set for the healing amount with the other. Give it a try Cosmo, and tell me what happens ;) (Ya know i mean Cozmo, jus pullin' your leg :P)
User avatar
Allan
Alpha
 
Posts: 4545
Joined: Wed Dec 21, 05 1:41 pm
Location: Northamptonshire, England.

Postby MainMan » Wed Mar 15, 06 5:39 pm

XII//:Prod1gy wrote:Haha, your cosmo the womens magazine XD.

I read that every day...
<center>ty m7
</center>
User avatar
MainMan
<i>Tru' Playa' Fer Defs</i>
 
Posts: 4655
Joined: Sun Jun 05, 05 7:38 am
Location: London, UK

Postby Cozmo » Wed Mar 15, 06 7:15 pm

Could someone post a list of all variables?
as in,

Var int
Var Float
etc...
Cozmo_RPG (v1 & v2)
MPConversations - A tool for creating multiplayer RPG stuff
Cozmo
Master
 
Posts: 1266
Joined: Tue Jun 28, 05 10:53 am
Location: UK

Postby Allan » Wed Mar 15, 06 9:01 pm

Um...

Var Float (Number with 6 decimal places)

Var Int (Non-decimal Number)

Var Bool (Yes/No variable)

Var Class (Selects a class type for the variable)

Note: Usually, after the Class bit, people put things like <Decoration> or <Weapon>, this limits the choice for this variable to things from that class.

Var YourClassHere (Lets you play around with the properties of another class, usually to do stuff like change appearence, etc.)

Note: Where YourClassHere is, put any class you like, so long as it has lots of variables to play around with ;)

Var String (Text entry variable, can be used for messages, or commands)

There is a Var Enum or something, but i dunno how to explain that one.. :?

Finally, if you put () after the Var bit (So it looks like Var() Int, for example), you can edit the variable value in UEd :D

Oh, and does your special Sodacan class use 2 at once Cozmo? *Points to my last post*
User avatar
Allan
Alpha
 
Posts: 4545
Joined: Wed Dec 21, 05 1:41 pm
Location: Northamptonshire, England.

Postby Cozmo » Wed Mar 15, 06 9:06 pm

No, sorry. :(
Ah so DF vanding machine can cheange lifespan of its product eh? :-k

Edit:

Another problem, i moddified the WeaponCreditcard to try make it so you can fire any ammount but there are problems...
To use you delete say and put Set WeaponCreditsmodified giveA NUMBER HERE but this only works on non-mtl because of set commands, :? any way of changing the ammount you give on mtl without needing admin?
Last edited by Cozmo on Wed Mar 15, 06 9:09 pm, edited 1 time in total.
Cozmo_RPG (v1 & v2)
MPConversations - A tool for creating multiplayer RPG stuff
Cozmo
Master
 
Posts: 1266
Joined: Tue Jun 28, 05 10:53 am
Location: UK

Postby Allan » Wed Mar 15, 06 9:09 pm

In theory, yes :) It can indeed.

Also, if you look at the normal vending machine, it may help you to get the Var ENum variable. Oddly, they are always situated at the top of the variable lists :? . I would put it there if you ever have to use one :)
Last edited by Allan on Wed Mar 15, 06 9:12 pm, edited 1 time in total.
User avatar
Allan
Alpha
 
Posts: 4545
Joined: Wed Dec 21, 05 1:41 pm
Location: Northamptonshire, England.

Postby Cozmo » Wed Mar 15, 06 9:10 pm

Oh yeah, bad mannors :(
ty allan
Cozmo_RPG (v1 & v2)
MPConversations - A tool for creating multiplayer RPG stuff
Cozmo
Master
 
Posts: 1266
Joined: Tue Jun 28, 05 10:53 am
Location: UK

Postby Allan » Wed Mar 15, 06 9:16 pm

No prob :)

Er, i'm not sure :? . This WeaponCreditcard from the Darkforce mod?
User avatar
Allan
Alpha
 
Posts: 4545
Joined: Wed Dec 21, 05 1:41 pm
Location: Northamptonshire, England.

Postby Cozmo » Wed Mar 15, 06 9:17 pm

Yes, i modified it with the var int thingy so you can get exact ammount to give another player instead of pressing 20 about 100.000.000.000 times, :evil:
but it only works on non-mtl because of set commands
Cozmo_RPG (v1 & v2)
MPConversations - A tool for creating multiplayer RPG stuff
Cozmo
Master
 
Posts: 1266
Joined: Tue Jun 28, 05 10:53 am
Location: UK

Postby Allan » Wed Mar 15, 06 9:33 pm

Er, Do you plan to use the darkforce safes/ATM's? (Just intrested)

I can try and do something, but the fact it isn't actually a weapon (because it isn't in DeusExWeapon) may be a bit of a hassle :? ...
User avatar
Allan
Alpha
 
Posts: 4545
Joined: Wed Dec 21, 05 1:41 pm
Location: Northamptonshire, England.

Postby Cozmo » Wed Mar 15, 06 9:37 pm

i know that, just sayin the classname
yes safes as well :D so u withdraw whatever instead of pressing 20 about 100.000.000.000 times.
Cozmo_RPG (v1 & v2)
MPConversations - A tool for creating multiplayer RPG stuff
Cozmo
Master
 
Posts: 1266
Joined: Tue Jun 28, 05 10:53 am
Location: UK

Next

Return to Editing issues

Who is online

Users browsing this forum: No registered users and 45 guests