Results 1 to 10 of 19

Thread: so i want to get into making races

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. Default so i want to get into making races

    and i seem to have no clue where to begin
    ive googled a bit and so far i have found a few templates and just sorta made it tweaked them slightly. this is the purest of pure cookie cutter bs and im curious if im headed down teh right path if i ended up with notepad open and this inside.

    ty for read and let me know if i am a complete moron.



    "7"
    {
    "name" "Flash"
    "author" "{tag}callo"
    "required_level" "50"
    "maximum_level" "0"
    "allow_only" "0"
    "teamlimit" "0"
    "preloadcmd" "0"
    "player_spawn_cmd" "0"
    "round_start_cmd" "0"
    "round_end_cmd" "0"
    "numberofskills" "1"
    "numberoflevels" "5"
    "skillnames" "Run fast"
    "skilldescr" "Run faster"
    "skillcfg" "player_spawn"

    "skill1_setting" "es_xsetinfo wcs_speed 1.1;es_xsetinfo wcs_alpha 50|es_xsetinfo wcs_speed 1.3;es_xsetinfo wcs_alpha 70|es_xsetinfo wcs_speed 1.5;es_xsetinfo wcs_alpha 90|es_xsetinfo wcs_speed 1.7;es_xsetinfo wcs_alpha 110|es_xsetinfo wcs_speed 1.8;es_xsetinfo wcs_alpha 130"
    "skill1_cmd" "es es_xkeygetvalue wcs_tmp WCSuserdata event_var(userid) speed;es es_xif (server_var(wcs_speed) > server_var(wcs_tmp)) then es est_Speed event_var(userid) server_var(wcs_speed);es es_xif (server_var(wcs_speed) > server_var(wcs_tmp)) then es_xkeysetvalue WCSuserdata event_var(userid) speed server_var(wcs_speed);es es_xtell event_var(userid) #multi #greenMagic m3: #lightgreenYou're all buttered up!"
    "skill1_sfx" "es es_xgetplayerlocation wcs_x1 wcs_y1 wcs_z1 event_var(userid);es est_effect 10 #a 0 sprites/smoke.vmt server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) 20 60 1 4 2 0 255 100 0 255 0"

  2. #2

    Default

    You need to make a race called Mastagunz....because I fucking own.
    I fucking love music
    Rip Paul Gray

    -----------------------
    Server rules
    TOS
    How to report admin abuse
    How to find hackers

  3. Default

    once i get much better i will begin to take suggestions and possibly make races like that though they will most likely not be integrated into any server any time soon

  4. Default

    probably not. we don't want our server filled to the brim w/ races. a (relatively) small group are all we want/need. though feel free to make some and submit them. a few of the best might get implemented, after balancing of course.
    Quote Originally Posted by OMGBEARS
    I feel it is important for me to let you know how feeble your efforts to strike such feelings inside of me really are. I have the internal fortitude of a large animal, an elephant, for instance. Likewise, I'm the result of coitus between the devil and a pack mule made out of chainsaws, so I am extremely strong, and carry little care for others in this world. Trees also stand aside due to my chainsaw blood.
    Quote Originally Posted by ๖ReS View Post
    How am I supposed to tell you to fuck off without replying ?

  5. Default

    im gonna be making them for the fun of making them and if i ever get my own server i could use them there. im just here to see if anyone who knows anything about making races can tell me if im headed the right way or if i completely off base

  6. Default

    You want to separate the config controller from the actual code and just use method calls to an external script. This is much easier to work with and also allows the ability for more complex programs. You also are not taking into consideration when to and not to use es_x commands. If you use them when you should not it will be extremely laggy. Also setinfo should NEVER be used unless you have no other choice as set is faster.

    You got the syntax down but so far this is a good example of why the server is so buggy b/c your current knowledge is what a lot of people try to program with and it turns into a cluster fuck that I got to reprogram. The real issue is the use of es_x and other arguments in es. It is a really confusing language but if you learn the fastest commands you will be set. I can tell you from experience that if you do not code it to run quickly it will fuck things up.

    Also I am sure there is a way to preform the logic of your speed operation after. Even the simplicity of the logic needs to be perfect or it will lag like a bitch. I am trying to understand what the code in the command is doing can you explain? NVM I see this is just taken from the flame pred, this is a good example of how many things cause lag in the server that I have had to fix.
    Last edited by ZERO; 03-27-2010 at 11:34 PM.



  7. Default

    Here take for example the code from my santa race simplified to be like yours:

    Code:
        "name"              "Santa"
        "author"            "ZERO"
        "required_level"    "320"
        "maximum_level"     "0"
        "allow_only"        "0"
        "teamlimit"         "0"
        "preloadcmd"        "0"
        "player_spawn_cmd"  "es_doblock zero_race/Santa/Santa_Spawn"
        "round_start_cmd"   "0"
        "round_end_cmd"     "0"
        "numberofskills"    "4"
        "numberoflevels"    "4"
        "skillnames"        "Sleigh"
        "skilldescr"        "Fly around at increasing speed."
        "skillcfg"          "player_ultimate"
    
        "skill1_setting"    "es_set Santa_Speed 1.5|es_set Santa_Speed 2|es_set Santa_Speed 2.5|es_set Santa_Speed 3"
        "skill1_cmd"        "es_doblock zero_race/Santa/Fly"
        "skill1_sfx"        "0"
        "ultimate_cooldown" "1"
    From zero_race/es_Santa.txt (code for this effect was ripped off the dragon fly)
    Code:
    block Fly
    {
      es es_xgetplayerlocation wcs_x2 wcs_y2 wcs_z2 server_var(wcs_userid)
      es_math wcs_z2 + 20
      es est_effect 10 #a 0 vgui/gfx/vgui/cs_logo.vmt server_var(wcs_x2) server_var(wcs_y2) server_var(wcs_z2) 80 90 1.6 10 10 0 255 0 0 255 1
      es est_effect 10 #a 0.2 vgui/gfx/vgui/cs_logo.vmt server_var(wcs_x2) server_var(wcs_y2) server_var(wcs_z2) 80 90 1.6 5 10 0 255 255 255 255 1
      es_math wcs_z2 + 20
      es est_effect 10 #a 0.4 vgui/gfx/vgui/cs_logo.vmt server_var(wcs_x2) server_var(wcs_y2) server_var(wcs_z2) 80 90 1.6 10 10 0 255 0 0 255 1
      es est_effect 10 #a 0.6 vgui/gfx/vgui/cs_logo.vmt server_var(wcs_x2) server_var(wcs_y2) server_var(wcs_z2) 80 90 1.6 5 10 0 255 255 255 255 1
      es_math wcs_z2 + 20
      es est_effect 10 #a 0.8 vgui/gfx/vgui/cs_logo.vmt server_var(wcs_x2) server_var(wcs_y2) server_var(wcs_z2) 80 90 1.6 10 10 0 255 0 0 255 1
      es est_effect 10 #a 1 vgui/gfx/vgui/cs_logo.vmt server_var(wcs_x2) server_var(wcs_y2) server_var(wcs_z2) 80 90 1.6 5 10 0 255 255 255 255 1
      es es_xkeygetvalue Dragon_Flyer WCSuserdata server_var(wcs_userid) Dragon_Flyer
      if (server_var(Dragon_Flyer) = 0) do 
      {
        es est_playplayer server_var(wcs_userid) wcs/zero/santa/jingle_bells.wav
        es es_xkeysetvalue WCSuserdata server_var(wcs_userid) Dragon_Flyer 1
        es est_jetpack server_var(wcs_userid) 1
        es est_speed server_var(wcs_userid) server_var(Santa_Speed)
        es est_setplayercolor server_var(wcs_userid) 115 15 15 175 1
        es_set entityCount 0
        es_set dfly "" 
        es_formatv dfly "smoke_%1" entityCount 
        es_give server_var(wcs_userid) env_Smokestack 
        es est_SetEntName server_var(eventscripts_lastgive) server_var(dfly) 
        es_fire server_var(wcs_userid) server_var(dfly)  addoutput "basespread 15"
        es_fire server_var(wcs_userid) server_var(dfly)  addoutput "spreadspeed 100"
        es_fire server_var(wcs_userid) server_var(dfly)  addoutput "speed 50"
        es_fire server_var(wcs_userid) server_var(dfly)  addoutput "startsize 15"
        es_fire server_var(wcs_userid) server_var(dfly)  addoutput "endsize 25"
        es_fire server_var(wcs_userid) server_var(dfly)  addoutput "rate 200"
        es_fire server_var(wcs_userid) server_var(dfly)  addoutput "jetlength 100"
        es_fire server_var(wcs_userid) server_var(dfly)  addoutput "twist 5"
        es_fire server_var(wcs_userid) server_var(dfly)  addoutput "SmokeMaterial particle\fire.vmt"
        es_fire server_var(wcs_userid) server_var(dfly)  addoutput "angles 90 90 90"
        es_fire server_var(wcs_userid) server_var(dfly)  addoutput "rendermode 18"
        es_fire server_var(wcs_userid) server_var(dfly)  addoutput "renderamt 100"
        es_fire server_var(wcs_userid) server_var(dfly)  addoutput "rendercolor 255 255 255"
        es_fire server_var(wcs_userid) server_var(dfly)  setparent !activator
        es_fire server_var(wcs_userid) server_var(dfly)  turnon
        es_math entityCount + 1
      }
      if (server_var(Dragon_Flyer) = 1) do
      {
        es es_xkeysetvalue WCSuserdata server_var(wcs_userid) Dragon_Flyer 0
        es est_jetpack server_var(wcs_userid) 0
        es est_speed server_var(wcs_userid) 1
        es est_setplayercolor server_var(wcs_userid) 255 225 225 255 1
        es_fire server_var(wcs_userid) server_var(dfly) kill
      }
    }
    In this code you see an example of how the logic that you copy and pasted can be simplified even without making a method:
    Code:
     "skill2_setting"    "es_set wcs_multiplier 1.2;es_set wcs_speed 1.1|es_set wcs_multiplier 1.3;es_set wcs_speed 1.2|es_set wcs_multiplier 1.4;es_set wcs_speed 1.2|es_set wcs_multiplier 1.5;es_set wcs_speed 1.2|es_set wcs_multiplier 1.6;es_set wcs_speed 1.2|es_set wcs_multiplier 1.8;es_set wcs_speed 1.3|es_set wcs_multiplier 2.4;es_set wcs_speed 1.3|es_set wcs_multiplier 2.6;es_set wcs_speed 1.4"
        "skill2_cmd"        "es es_keysetvalue WCSuserdata event_var(userid) longjump server_var(wcs_multiplier);es est_speed event_var(userid) server_var(wcs_speed);wcs_getlanguage wcs_lng wcs_lng_r_longjump;es es_tell event_var(userid) #multi server_var(wcs_lng)"
        "skill2_sfx"        "es es_getplayerlocation wcs_x1 wcs_y1 wcs_z1 event_var(userid);es est_effect 10 #a 0 dev/ocean.vmt server_var(wcs_x1) server_var(wcs_y1) server_var(wcs_z1) 60 70 3 30 100 0 255 100 100 255 10"
    Note how there are few if statements or calls only data being set. The least amount of code possible always needs to be used. In fact I should probably go in the next few weeks and try to clean up and overhaul a lot of this bad code so that the lag is reduced.
    Last edited by ZERO; 03-27-2010 at 11:40 PM.



  8. Default

    thanks i will be able to use your coding as a great reference for flash

    i will get to work on this all tomorrow tho since its 1 am where i am and ive been dead tired due to work since about 8.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •