Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Small update on weapon attachments  (Read 1703 times)

0 Members and 1 Guest are viewing this topic.

Offline Pepsifan04

  • *
  • *
  • +12% chance to make useful post
  • Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...
    • Smod: CryLife
Small update on weapon attachments
« on: December 05, 2013, 07:21:57 PM »
The "code" for it is now complete.
it supports 16 variants per gun and it's mapadd controlled.
Now it's using bodygroups for models (not separate models or animations) and math_counter and logic_case for ,well, logic.
As for now it works flawless...

The "beta" should be available in a week or so...

this is the mapadd part:
Code: [Select]
"point_servercommand"
{
"keyvalues"
{
"targetname" "cmd"
}
}

"math_counter" {
"keyvalues" {
"targetname" "test_math"
"startvalue" "111"
"min" "111"
"max" "424"
"outvalue" "test_case,invalue,,0,-1"
}
}


"logic_case" {
"keyvalues" {
"targetname" "test_case"
"Case01" "111"
"Case02" "121"
"Case03" "211"
"Case04" "222"
"Case05" "124"
"OnCase01" "cmd,command,echo case1,0,-1"
"OnCase02" "cmd,command,echo case2,0,-1"
"OnCase03" "cmd,command,echo case3,0,-1"
"OnCase04" "cmd,command,echo case4,0,-1"
"OnCase05" "cmd,command,echo case5,0,-1"
}
}
}
note that instead "cmd" it fires "viewmodel,setbodygroup,#,-1"
 where # is bodygroup number working in a similar fashion to custom weapon firemodes

and part of the .qc for the weapon model
Code: [Select]
$model "studio" "body_scar.smd"

$bodygroup 3rd_slot
{
blank
studio "body_scar_eo.smd"
studio "body_scar_elcant.smd"
studio "body_scar_scope.smd"
}

$bodygroup 2nd_slot
{
blank
studio "body_anpeq.smd"
}

$bodygroup 1nd_slot
{
blank
studio "body_scar_sila.smd"
}

the only problem are the bloody overlays for GUI... help anyone?
DROP DATABASE bsnooch

Offline Counter-Life™

  • *
  • *
  • +17% chance to make useful post
  • Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!Counter-Life™ is a rising star!
    • Youtube Channel
Re: Small update on weapon attachments
« Reply #1 on: December 05, 2013, 07:26:40 PM »
How will u make the ironsihgts work for all different attachements? and sound replacements?

Offline Pepsifan04

  • *
  • *
  • +12% chance to make useful post
  • Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...Pepsifan04 might someday be someone...
    • Smod: CryLife
Re: Small update on weapon attachments
« Reply #2 on: December 05, 2013, 07:31:16 PM »
it sill going to use 4 custom_weapons per weapon, and rt scopes always display center of the screen, so I can use 2 scripts for silenced/unsilenced with naked irons, and 2 scripts for silenced/unsilenced with anything attached in the 3rt slot ( I've already tested that so I know it works)
DROP DATABASE bsnooch

Offline Comrade

  • *
  • *
  • +11% chance to make useful post
  • Comrade might someday be someone...Comrade might someday be someone...Comrade might someday be someone...Comrade might someday be someone...
Re: Small update on weapon attachments
« Reply #3 on: December 05, 2013, 07:40:23 PM »
it sill going to use 4 custom_weapons per weapon, and rt scopes always display center of the screen, so I can use 2 scripts for silenced/unsilenced with naked irons, and 2 scripts for silenced/unsilenced with anything attached in the 3rt slot ( I've already tested that so I know it works)
I like the whole bodygroup mishmash, but I really don't like how it's still bloated as fuck and limited to 7 and a half weapons only.
I really look forward to SMMOD and its whole infinite custom weapon system. And bodygroups.