Thread: [plugin] Breaklights for everyone

Results 1 to 12 of 12
  1. #1
    Registered User Sprengmeister's Avatar
    Join Date
    Mar 2016
    Location
    Germany
    Posts
    24

    Lightbulb [plugin] Breaklights for everyone

    Hi fellows,

    I made a little script, and models for throwable breaklights.

    Installation:
    1. download this file: https://www.dropbox.com/s/j7onw5am8m...ht_b1.rar?dl=0
    2. extract it to your "Steam\SteamApps\common\Sven Co-op" folder.
    3. open up your default_plugins.txt with any text editor (lacated in: "Steam\SteamApps\common\Sven Co-op\svencoop")
    and add the following lines into the "plugins" block:
    Code:
        
    
    "plugin"
    {
    "name" "Che Of Doom's Plugin"
    "script" "../maps/CheofDoom/CheOfDoom_register"
    }
    4. ingame you should spawn "weapon_breaklight" through give commands or in any other way of your favor, or just add this item to your map.
    5. Have fun

    There is only one Problem I couldn't solve yet:
    To get better performance (I think it depends on the nextthink rate) I made different nextthink times depending on if the breaklight is moving or just lieing arround.
    But the problem is, that the TE_DLIGHT's finishing and the nextthink aren't synchronous, and the timimg depends on the map performance.
    So in some cases the next light-effect plops up when the previous one has not finished, which causes an anoying blinking effect
    If anyone can help to improve this and share it here it would be great.

    Here are some screenshots:
    Click image for larger version. 

Name:	20170702003951_1.jpg 
Views:	124 
Size:	59.1 KB 
ID:	17769
    Click image for larger version. 

Name:	20170702003851_1.jpg 
Views:	51 
Size:	61.5 KB 
ID:	17770
    Click image for larger version. 

Name:	20170702003925_1.jpg 
Views:	53 
Size:	105.1 KB 
ID:	17771
    Ok, the animation is not perfect

  2. #2
    warrior spy-warrior's Avatar  
    Contributor
    Join Date
    Nov 2006
    Location
    Europe, France, Paris
    Posts
    2,922

    Re: [plugin] Breaklights for everyone

    Good job

  3. #3
    Registered User
    Join Date
    Apr 2016
    Posts
    54

    Re: [plugin] Breaklights for everyone

    Thanks! Nice weapon!

  4. #4
    Registered User
    Join Date
    Apr 2016
    Posts
    54

    Re: [plugin] Breaklights for everyone

    Please create Laser Weapon or Laser Tripmine ^_^

  5. #5
    Registered User Sprengmeister's Avatar
    Join Date
    Mar 2016
    Location
    Germany
    Posts
    24

    Re: [plugin] Breaklights for everyone

    I planed a bunch of weapons, also a red deadly laser Tripmine ^^
    A npc catcher is in alpha phase, too. So when things are ready I'm going to upload them

  6. #6
    Registered User
    Join Date
    Apr 2016
    Posts
    54

    Re: [plugin] Breaklights for everyone

    Thank you! Good Luck!

  7. #7
    Advanced Leveldesigner SourceSkyBoxer's Avatar
    Join Date
    Apr 2011
    Location
    Germany
    Posts
    758

    Re: [plugin] Breaklights for everyone

    Oh really nice idea why not Star Wars lightsaber?
    Hello guys, Svencoop. I am sorry Please respect me! I am deaf. Thanks, Sven-Coop Forum!

    Please do not share to shit dropbox! Please share only Mega.nz!

  8. #8
    Registered User Sprengmeister's Avatar
    Join Date
    Mar 2016
    Location
    Germany
    Posts
    24

    Re: [plugin] Breaklights for everyone

    The lightsaber is almost done just a bit finetuning remaining.

  9. #9
    Still learning wolf-3d's Avatar  
    Tester
    Join Date
    Jan 2011
    Location
    Somewhere Warm.
    Posts
    1,431

    Re: [plugin] Breaklights for everyone

    Looked at BreakLight.as but could not get the nextthink's to sync, especially when I introduced lag.

    So instead, gave up and limited the "life time" to the max of 25.5 sec, dumped the nextthink code, re-arrange some stuff and then just managed to stop myself from totally mangling your code
    Mangled because I avoided the initial problem and then started to add my own changes, which is very rude. (I was using your code to spawn friendly turrets and gargs at one stage, but don't worry have removed those bits.)

    Result is a version of your breaklight, for you to look at, which does not flicker (no "nextthink") but is limited to ~25 sec.

    I also switch the "Fade radius/shrink effect on". Suggest you add a Cvar so people can choose for themselves.
    I will PM the "code" to you, use/abuse as you wish.

    Video of "Mangled Break light" under lag.

    PS: If you do publish this alternative code for whatever reason, Remove any unnecessary or personal explanations/ramblings to you and any variables/functions that have been commented out. (They will just confuse people.)

    PPS: Just looked at the video, also changed the "glow delay" (starts 1.5 sec after release) and possibly up'd brightness, start radius & other things. (Seems I didn't revert as much as I thought.)
    Last edited by wolf-3d; 12-09-2017 at 09:11 PM.
    Regards
    Wolf-3D

  10. #10
    Advanced Leveldesigner SourceSkyBoxer's Avatar
    Join Date
    Apr 2011
    Location
    Germany
    Posts
    758

    Re: [plugin] Breaklights for everyone

    Why not for me working

    I already added plugin and default_plugin.txt and loads but i cannot give "weapon_breaklight" PS: Stop changing release! I don't understand i already tried tried. No success. Because I have loaded as_reloadplugins than It gives success no error.

    And I tried "give weapon_breaklight" and it doesn't see "give" command of Sven Coop.
    Hello guys, Svencoop. I am sorry Please respect me! I am deaf. Thanks, Sven-Coop Forum!

    Please do not share to shit dropbox! Please share only Mega.nz!

  11. #11
    Still learning wolf-3d's Avatar  
    Tester
    Join Date
    Jan 2011
    Location
    Somewhere Warm.
    Posts
    1,431

    Re: [plugin] Breaklights for everyone

    ... and it doesn't see "give" command of Sven Coop.
    The "give" command is seen as a Cheat for "server Admins", to test breaklight, start a local/Listen server, load a map, Open console, sv_cheats 2, give weapon_breaklight, (or any other pre-cached weapon already in map or via a plugin), Close console.

    IF that doesn't work, I guess the plugin for breaklight is not being registered correctly for some reason.
    PS: Your "local" plugin's are ignored when you go on-line because that would obviously allow you to "cheat"

    PPS: I don't think Sprengmeister has changed any thing. (and I have only changed my own local version.)
    Regards
    Wolf-3D

  12. #12
    Advanced Leveldesigner SourceSkyBoxer's Avatar
    Join Date
    Apr 2011
    Location
    Germany
    Posts
    758

    Re: [plugin] Breaklights for everyone

    Thanks I tried. I already sv_cheats 2 than it happens "give" not in Sven Coop Console Window Popup menu item. It is sometimes bug. - I restart Steam again. just I type console "give and shows error:
    Code:
    Can't create entity: 
    NULL Ent in GiveNamedItem!
    I am surprised because Sven Coop console's Popup menu item doesn't list with "give" like this
    https://i.imgur.com/Z3xtabF.jpg
    https://i.imgur.com/tisdsty.jpg
    https://i.imgur.com/tUKUru0.jpg
    PS Sorry it is big from my tablet Samsung Galaxy Tab A6 :O
    // EDIT: I change "img" to "url"

    That is why Sven Coop's Popup menu item doesn't list with "give" because it is bugged. We need to submit bug to Sven Coop Team.

    And i give console.
    Code:
    give weapon_breaklight
    It works fine. I am sorry because I am hesitating it.
    Hello guys, Svencoop. I am sorry Please respect me! I am deaf. Thanks, Sven-Coop Forum!

    Please do not share to shit dropbox! Please share only Mega.nz!

Posting Permissions

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