Raised This Month: $51 Target: $400
 12% 

[CS:GO] Modifying logic_case


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
crewparadise
Member
Join Date: Jun 2015
Location: Seoul, South Korea
Old 08-28-2015 , 04:57   [CS:GO] Modifying logic_case
Reply With Quote #1

In hammer info,

classname: logic_case
targetname : cloudcase
connections
{
"OnCase01" "step1laySound:0:-1"
"OnCase02" "step2laySound:0:-1"
"OnCase03" "step4laySound:0:-1"
"OnCase04" "step3laySound:0:-1"
}

So I've used this code for modify result of "OnCase01~04"

PHP Code:
public patch_case()
{
    new 
ent_first = -1;
    while((
ent_first Entity_FindByHammerId(1813613"logic_case")) != -1)
    {
        new 
ref EntIndexToEntRef(ent_first);
        
        
SetVariantString("OnCase01 step1_e2:PlaySound:0:-1");
        
AcceptEntityInput(ref"AddOutput");

        
SetVariantString("OnCase02 step2_e2:PlaySound:0:-1");
        
AcceptEntityInput(ref"AddOutput");

        
SetVariantString("OnCase03 step3_e2:PlaySound:0:-1");
        
AcceptEntityInput(ref"AddOutput");

        
SetVariantString("OnCase04 step4_e2:PlaySound:0:-1");
        
AcceptEntityInput(ref"AddOutput");
    
        break;
    }

But it not works, anyone can help me ?

Last edited by crewparadise; 08-28-2015 at 04:57.
crewparadise is offline
iGANGNAM
AlliedModders Donor
Join Date: Sep 2012
Location: Lithuania
Old 08-28-2015 , 05:47   Re: [CS:GO] Modifying logic_case
Reply With Quote #2

Maybe hammer id is invalid?
iGANGNAM is offline
crewparadise
Member
Join Date: Jun 2015
Location: Seoul, South Korea
Old 08-28-2015 , 06:06   Re: [CS:GO] Modifying logic_case
Reply With Quote #3

Quote:
Originally Posted by iGANGNAM View Post
Maybe hammer id is invalid?
HammerID is correct
crewparadise is offline
m_bNightstalker
Senior Member
Join Date: Jan 2015
Location: JWD
Old 08-28-2015 , 11:43   Re: [CS:GO] Modifying logic_case
Reply With Quote #4

Why are you using ent ref?

AcceptEntityInput
(
ent_first, "AddOutput");
m_bNightstalker is offline
crewparadise
Member
Join Date: Jun 2015
Location: Seoul, South Korea
Old 08-29-2015 , 08:39   Re: [CS:GO] Modifying logic_case
Reply With Quote #5

Quote:
Originally Posted by m_bNightstalker View Post
Why are you using ent ref?

AcceptEntityInput
(
ent_first, "AddOutput");

Those method is correct?
crewparadise is offline
m_bNightstalker
Senior Member
Join Date: Jan 2015
Location: JWD
Old 08-29-2015 , 11:03   Re: [CS:GO] Modifying logic_case
Reply With Quote #6

Quote:
Originally Posted by crewparadise View Post
Those method is correct?
The first param asks for a entity index, not for a entity reference
m_bNightstalker is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 08-29-2015 , 12:14   Re: [CS:GO] Modifying logic_case
Reply With Quote #7

Quote:
Originally Posted by m_bNightstalker View Post
The first param asks for a entity index, not for a entity reference
Most (all?) functions that accept an entity index also accept an entity reference.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
zipcore
Veteran Member
Join Date: Mar 2010
Location: m_flZipcore
Old 08-30-2015 , 16:14   Re: [CS:GO] Modifying logic_case
Reply With Quote #8

oh okey, good to know
__________________

Last edited by zipcore; 08-30-2015 at 16:16.
zipcore is offline
Indarello
Senior Member
Join Date: Nov 2015
Location: Russia
Old 08-18-2019 , 13:19   Re: [CS:GO] Modifying logic_case
Reply With Quote #9

Maybe somebody will search for this tread some day, like me today
This worked for me:
Spoiler

Last edited by Indarello; 08-18-2019 at 13:20.
Indarello is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:50.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode