April 20, 2019, 07:22:18 PM

Author Topic: Explosive Barrels!!!  (Read 7837 times)

Offline Phat_Wizard

  • <WCS coder>
  • Level 7 Expert
  • *****
  • Posts: 229
Explosive Barrels!!!
« on: November 27, 2007, 04:44:44 AM »
As per request, I have posted this code in a new topic for ease of finding and what not.

es_WCSraces_db.txt
Code: (eventscripts) [Select]
"#"
{
"name"              "Explosive Prop Test"
"author"            "Phat_Wizard"
"shortdescription"  "[test]"
"required_level"    "0"
"maximum_level"     "0"
"allow_only"        "0"
"teamlimit"         "0"
"preloadcmd"        "0"
"player_spawn_cmd"  "0"
"round_start_cmd"   "0"
"round_end_cmd"     "0"
"numberofskills"    "3"
"numberoflevels"    "4"
"skillnames"        "Speed|Gravity|Explosive Prop"
"skilldescr"        "+speed|-gravity|spawn a prop then... BOOM!!!"
"skillcfg"          "player_spawn|player_spawn|player_ultimate"

"skill1_setting"    "es_set wcs_speed 1.4|es_set wcs_speed 1.6|es_set wcs_speed 1.8|es_set wcs_speed 2.0"
"skill1_cmd"        "es est_speed event_var(userid) server_var(wcs_speed)"
"skill1_sfx"        ""

"skill2_setting"    "es_set wcs_grav 0.8|es_set wcs_grav 0.6|es_set wcs_grav 0.4|es_set wcs_grav 0.2"
"skill2_cmd"        "es est_setgravity event_var(userid) server_var(wcs_grav)"
"skill2_sfx"        ""

"skill3_setting"    "es_set wcs_fuse 4|es_set wcs_fuse 3|es_set wcs_fuse 2|es_set wcs_fuse 1"
"skill3_cmd"        "es_doblock wcs/WCSultimates/wcs_ultiexplodeprop"
"skill3_sfx"        ""
"ultimate_cooldown" "5|4|3|2"
}
[Spoiler]
Code: [Select]
"#"
{
"name"              "Explosive Prop Test"
"author"            "Phat_Wizard"
"shortdescription"  "[test]"
"required_level"    "0"
"maximum_level"     "0"
"allow_only"        "0"
"teamlimit"         "0"
"preloadcmd"        "0"
"player_spawn_cmd"  "0"
"round_start_cmd"   "0"
"round_end_cmd"     "0"
"numberofskills"    "3"
"numberoflevels"    "4"
"skillnames"        "Speed|Gravity|Explosive Prop"
"skilldescr"        "+speed|-gravity|spawn a prop then... BOOM!!!"
"skillcfg"          "player_spawn|player_spawn|player_ultimate"

"skill1_setting"    "es_set wcs_speed 1.4|es_set wcs_speed 1.6|es_set wcs_speed 1.8|es_set wcs_speed 2.0"
"skill1_cmd"        "es est_speed event_var(userid) server_var(wcs_speed)"
"skill1_sfx"        ""

"skill2_setting"    "es_set wcs_grav 0.8|es_set wcs_grav 0.6|es_set wcs_grav 0.4|es_set wcs_grav 0.2"
"skill2_cmd"        "es est_setgravity event_var(userid) server_var(wcs_grav)"
"skill2_sfx"        ""

"skill3_setting"    "es_set wcs_fuse 4|es_set wcs_fuse 3|es_set wcs_fuse 2|es_set wcs_fuse 1"
"skill3_cmd"        "es_doblock wcs/WCSultimates/wcs_ultiexplodeprop"
"skill3_sfx"        ""
"ultimate_cooldown" "5|4|3|2"
}

es_WCSultimates.txt
Code: (eventscripts) [Select]
block wcs_ultiexplodeprop
{
es_prop_physics_create server_var(wcs_userid) props_c17/oildrum001_explosive.mdl

es_format wcs_temp "wcs_%1" server_var(wcs_userid)
es est_setentname server_var(eventscripts_lastgive) server_var(wcs_temp)

es_fire server_var(wcs_userid) server_var(wcs_temp) addoutput "spawnflags 256"
es_fire server_var(wcs_userid) server_var(wcs_temp) addoutput "physdamagescale 9999"
es_fire server_var(wcs_userid) server_var(wcs_temp) addoutput "exploderadius 400"
es_fire server_var(wcs_userid) server_var(wcs_temp) addoutput "explodedamage 200"
es_delayed server_var(wcs_fuse) es_fire server_var(wcs_userid) server_var(wcs_temp) addoutput "onhealthchanged !self,break"
es_delayed server_var(wcs_fuse) es_fire server_var(wcs_userid) server_var(wcs_temp) addoutput "onhealthchanged !self,kill,,1.0"
}
[Spoiler]
Code: [Select]
block wcs_ultiexplodeprop
{
es_prop_physics_create server_var(wcs_userid) props_c17/oildrum001_explosive.mdl
es_format wcs_temp "wcs_%1" server_var(wcs_userid)
es est_setentname server_var(eventscripts_lastgive) server_var(wcs_temp)
es_fire server_var(wcs_userid) server_var(wcs_temp) addoutput "spawnflags 256"
es_fire server_var(wcs_userid) server_var(wcs_temp) addoutput "physdamagescale 9999"
es_fire server_var(wcs_userid) server_var(wcs_temp) addoutput "exploderadius 400"
es_fire server_var(wcs_userid) server_var(wcs_temp) addoutput "explodedamage 200"
es_delayed server_var(wcs_fuse) es_fire server_var(wcs_userid) server_var(wcs_temp) addoutput "onhealthchanged !self,break"
es_delayed server_var(wcs_fuse) es_fire server_var(wcs_userid) server_var(wcs_temp) addoutput "onhealthchanged !self,kill,,1.0"
}

After putting the code in the correct text files it should work, as in I DID test this by my self with bots and it worked... also you can change the length of the "fuse" withing the skills settings as well you can change the ultimate cool down. Please note that when the barrel kills a player the player suicides, but none the less is very fun. :P
« Last Edit: September 17, 2008, 12:24:55 AM by Phat_Wizard »

Offline Phat_Wizard

  • <WCS coder>
  • Level 7 Expert
  • *****
  • Posts: 229
Re: Explosive Barrels!!!
« Reply #1 on: November 29, 2007, 03:19:59 AM »
lol, maybe since you say server is ZM you might want to put a team check in there so that zombies can destroy cades.  ;)

Offline Angelღ

  • Level 7 Expert
  • *****
  • Posts: 334
Re: Explosive Barrels!!!
« Reply #2 on: November 30, 2007, 10:13:15 PM »
ya lol
"Death is just the first step"

~AJ

Offline jimbodude

  • Level 2 Apprentice
  • **
  • Posts: 57
Re: Explosive Barrels!!!
« Reply #3 on: January 31, 2008, 05:13:45 PM »
So this makes anything exploded when you shoot it?

Offline Phat_Wizard

  • <WCS coder>
  • Level 7 Expert
  • *****
  • Posts: 229
Re: Explosive Barrels!!!
« Reply #4 on: January 31, 2008, 06:26:43 PM »
no you spawn a barrel and the barrel will explode...

Offline Carnifexe

  • Level 2 Apprentice
  • **
  • Posts: 50
Re: Explosive Barrels!!!
« Reply #5 on: February 01, 2008, 01:47:51 PM »
It will be more fun when you can set the barrel on the ground and you get the kill from i ask Phat_Wizard about into a request
« Last Edit: February 01, 2008, 01:50:18 PM by Carnifexe »

Offline terror

  • Level 0 Beginner
  • Posts: 8
Re: Explosive Barrels!!!
« Reply #6 on: February 10, 2008, 03:39:57 AM »
this is my fav skill funnest skill ever

Offline Carnifexe

  • Level 2 Apprentice
  • **
  • Posts: 50
Re: Explosive Barrels!!!
« Reply #7 on: February 19, 2008, 08:30:10 AM »
ok i figured out by my self now i can shoot em perfect bye carnifexe

Offline Rasmus

  • Trapped in between
  • Level 7 Expert
  • *****
  • Posts: 1503
Re: Explosive Barrels!!!
« Reply #8 on: May 18, 2008, 02:52:59 PM »
do you spawn the barrel where you stand or where you look?
because im trying to make a skill which will spawn a barrel at viewcoord, but it doesnt spawn the barrel:(
where would you put the comma in the following telegram from a wife, to her husband in the navy?
"Not getting any better hurry home!"

Offline runnen

  • Level 3 Trained Apprentice
  • ***
  • Posts: 72
Re: Explosive Barrels!!!
« Reply #9 on: June 05, 2008, 04:50:26 AM »
does this have to be fully leveled to work? or did i do something wrong?

i put the block in the es_WCSultimates.txt instead of the es_WCSultimates_db.txt because there wasnt a folder named that in my server.

is that my problem?

Offline RK1132

  • Level 5 Trained Intermediate
  • *****
  • Posts: 105
Re: Explosive Barrels!!!
« Reply #10 on: June 05, 2008, 06:02:25 AM »
NICe tight  spam
« Last Edit: September 16, 2008, 08:43:48 PM by First Samurai »

Offline benoii

  • Level 0 Beginner
  • Posts: 2
Re: Explosive Barrels!!!
« Reply #11 on: September 16, 2008, 07:20:47 PM »
At my Server the are Comin no Barrels ;( only the Ultimate Cooldown!?  could one help me pls?? :roll: