1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Started coding (Newbie question)

Discussion in 'Programming' started by ma2Wolf, Feb 7, 2002.

  1. ma2Wolf

    ma2Wolf all round stupid imbecile

    Joined:
    Feb 7, 2002
    Messages:
    22
    Likes Received:
    0
    I am really new to coding and always seem to get errors when i hit the compile button. I need help starting out. I tried to make the Quadshot once but my computer crashed and went to the desktop. Anyway...I would like to know how to make a new game info where you start with no weapons. This is because i want to make a mod will only use weapons which i will make (sooner or later). If this doesn't make sense please tell me because i'm not really sure what i'm talking about to be honest :)
     
  2. ma2Wolf

    ma2Wolf all round stupid imbecile

    Joined:
    Feb 7, 2002
    Messages:
    22
    Likes Received:
    0
    P.S

    Oh and by the way. I am not sure what all the code means so please try to tell me what to do step by step. Thanks alot.;)
     
  3. drakorg

    drakorg New Member

    Joined:
    Feb 4, 2002
    Messages:
    6
    Likes Received:
    0
    Hi, there is a nice tutorial for beginners at http://unreal.epicgames.com/
    it explains how to compile your code, etc.

    now if your problem is code related you should ask more specific questions ...
     
  4. ma2Wolf

    ma2Wolf all round stupid imbecile

    Joined:
    Feb 7, 2002
    Messages:
    22
    Likes Received:
    0
    thx

    thanks alot. i'll give that a try. I will try to ask much more specific questions in the future. cheers :)
     
  5. ma2Wolf

    ma2Wolf all round stupid imbecile

    Joined:
    Feb 7, 2002
    Messages:
    22
    Likes Received:
    0
    Are there any other sites with some beginner tutorials???
     
  6. Raeled

    Raeled Feuer Frei!

    Joined:
    Jul 1, 2001
    Messages:
    161
    Likes Received:
    0
    your posting on it's forum :)
     
  7. Call me Erdrik

    Call me Erdrik Arch Mage

    Joined:
    Nov 24, 1999
    Messages:
    334
    Likes Received:
    0
    no need to code for this just goto info>gameinfo
    and find the single player gametype. then make a new subclass.
    then in the new subclass in its default properties change defualt weapon to none.
     
  8. ma2Wolf

    ma2Wolf all round stupid imbecile

    Joined:
    Feb 7, 2002
    Messages:
    22
    Likes Received:
    0
    Thanks alot, i am just trying to get to grips with unrealscript. I only have access to the internet through college and so i won't be able to post replys for a week because i'll be off for half term.

    I tried coding again last night... I tried to put the stinger from Unreal into UT. I copied the stinger ammo and stinger code into the ut_pickup and tournament_weapon code and i don't know what ive done wrong but it doesn't work. I'm just suck at the moment! :)

    I am not going to give up though...

    Later
     
  9. ma2Wolf

    ma2Wolf all round stupid imbecile

    Joined:
    Feb 7, 2002
    Messages:
    22
    Likes Received:
    0
    oh i may be able to post replies through my friend's computer if he will let me...Damn it! i want the internet (sobs)
     
  10. jb

    jb New Member

    Joined:
    May 22, 2000
    Messages:
    278
    Likes Received:
    0
    watch out for AccessNones when the bots dont have weapons. I tried the same thing (no weapons) but ran into issues with bots (the acccess none was part of the botpack.bot.roaming). My soultion was to give them a dummy gun (weapon with no mesh, no ammo, no nothing). However I did this using a TeamGamePlus subclass for my game. Wonderinf if Erdrik's way works in this case too....
     
  11. ma2Wolf

    ma2Wolf all round stupid imbecile

    Joined:
    Feb 7, 2002
    Messages:
    22
    Likes Received:
    0
    I am really new to coding so i am not sure where to find the "AccessNone". I'm sorry is that in the bot code or the weapon code??

    Please don't shout at me because i don't know anything:)

    I'll try to find it tonight.

    Thanks alot.

    Later
     
  12. ma2Wolf

    ma2Wolf all round stupid imbecile

    Joined:
    Feb 7, 2002
    Messages:
    22
    Likes Received:
    0
    thanks for your help everyone.

    I'm learning as i go...
     
  13. ma2Wolf

    ma2Wolf all round stupid imbecile

    Joined:
    Feb 7, 2002
    Messages:
    22
    Likes Received:
    0
    OH S**T just realized where to find the accessNone... Sorry!!!
     
  14. jb

    jb New Member

    Joined:
    May 22, 2000
    Messages:
    278
    Likes Received:
    0
    yeap Access Nones you should treat as errors. And the info that is in the log is not the best tool to find out what caused the error. Usally you get enough to find which function caused the error. But if that function is big then finding the issue because less fun. However every Uscript program has to deal with them. So welcome to Uscript :)
     
  15. ma2Wolf

    ma2Wolf all round stupid imbecile

    Joined:
    Feb 7, 2002
    Messages:
    22
    Likes Received:
    0
    okay i'll try it tonight...I try to post over the next week if ican :)
     
  16. Papapishu

    Papapishu 我是康

    Joined:
    Jun 18, 2001
    Messages:
    2,043
    Likes Received:
    0
    First: Welcome to the wonderful world of UScript!
    Second: I think that the stinger issue is because of the DMMutator, the default weapon mutator, but I could be wrong.
    Third: I think you need some help getting started, like compiling, and coding efficiently (like, don't use UnrealEd)

    If you have any questions at all, feel free to PM me...
     
  17. Call me Erdrik

    Call me Erdrik Arch Mage

    Joined:
    Nov 24, 1999
    Messages:
    334
    Likes Received:
    0
    Ive never doen this but (Im pretty lazy when it comes to access nones :p )....

    you could always split up a big function into smaller functions like:


    function MainPiece()
    {
    if (blah)
    Spawn(blah);
    Piece1();
    }
    function Piece1()
    {
    if (blah)
    blah;
    Piece2();
    }
    function Piece2()
    {
    if (blah)
    blah;
    Piece3();
    }
    function Piece3()
    {
    if (blah)
    blah;
    }

    That way it will show which 'peice' of the function is giving the access none and should be easier to find tho it may be too much to split up the function :p just a thought...
     
  18. Mychaeel

    Mychaeel New Member

    Joined:
    Oct 3, 2001
    Messages:
    3,830
    Likes Received:
    0
    Welcome, and please use the [code]...[/code] tags for quoting source code. It preserves indentations, uses a monospaced font and thus makes your quoted code way more readable.

    A neatly coded script just doesn't throw "Accessed None"s. An "Accessed None" is always an error, and the mere fact that it doesn't crash Unreal Tournament and is handled more or less gracefully by the engine doesn't mean it's less of a bug. (And it is easy enough to avoid anyway.)

    Besides, every message that is written to the log slows down the game a bit (even though log output is buffered), and if your script throws tons of warnings, the impact on game speed is considerable, and it produces ridiculously huge log files and might even crash game servers.

    I'm with jb---you should consider "Accessed None"s as the engine's friendly pointers to bugs that urgently need to be fixed.
     
  19. Raeled

    Raeled Feuer Frei!

    Joined:
    Jul 1, 2001
    Messages:
    161
    Likes Received:
    0
    'access none''s also cause a little slowdown.

    a lot of 'access none''s each frame can cause a noticable(damn what a word :) ) dropping of framerate.
     
  20. RegularX

    RegularX Master of Dagoth Lies

    Joined:
    Feb 2, 2000
    Messages:
    1,215
    Likes Received:
    0
    Agreed.

    I hate Accessed Nones, as well as Null Pointers - their close relatives in other languages.

    Mychaeel and Raeled is right though...it can cause performance drops. Negligible most of time, but that's not what matters - we're not coding chess emulators here (well, not usually). Performance is a key factor in how these games are played. Once you have gone through and cleaned out ALL of the AC's you notice the difference.

    Not to mention the fact that when someone downloaded your code, they didn't expect to have a 35+ MB file generated on their hard drive when they tried it out. All it takes is one or two AC's in a tick() or a HUD function and you can easily be transerring a meg a minute down to the box.


    But here's the thing - while they can be REALLY annoying to track down sometimes ... you can ALWAYS track them down. There isn't an AC out there that can't be fixed (since all you have to do is find out the cause and check for it), so there's no real excuse NOT to do so. At least for anything you actually expect the public to use.


    rgx
     

Share This Page