AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   func_breakable animation (https://forums.alliedmods.net/showthread.php?t=127033)

grankee 05-16-2010 08:22

func_breakable animation
 
Hello.
I need to change this window [IMG]http://img256.**************/img256/5308/csoffice0000z.png[/IMG]

to window like func_breakable.
It way to fake this, but I need to play animation, when I damage glass. Now it just fade away :(

Code:

/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <engine>
#include <fakemeta>
#include <hamsandwich>


public plugin_init() {
    register_plugin("office remake", "0.1","grankee")
    //register_clcmd("usun","usun")
    RegisterHam(Ham_TakeDamage,"func_wall","br")
    usun()
    register_event("HLTV","NewRound","a")
    register_forward(FM_EmitSound, "fwEmitSound")
}
public NewRound()
{
    entity_set_int(200, EV_INT_effects, 0)
    entity_set_int(200, EV_INT_solid, 4)
}
public br(Victim)
{
    if(Victim==200)
        {
            engfunc(EngFunc_EmitSound,Victim, 2, "debris/bustglass2.wav", 1.000000, 0.800000, 0, 116)
            entity_set_int(Victim, EV_INT_effects, 128)
            entity_set_int(Victim, EV_INT_solid, 0)
        }
}
public usun()
{
    new ent=200
    entity_set_float(ent, EV_FL_health, 10000.0)
    entity_set_float(ent, EV_FL_takedamage, 1.0)
   
    return 1
}


KadiR 05-16-2010 08:31

Re: func_breakable animation
 
I think you need to specify the type of the entity. ( (material) 0 .

Something like this:

PHP Code:

DispatchKeyValueiEntity"material""0" ); 


grankee 05-16-2010 09:17

Re: func_breakable animation
 
hmm where I must put this line?

Mxnn 05-16-2010 21:10

Re: func_breakable animation
 
"Material" must be "glass"?

NiQu 05-16-2010 21:18

Re: func_breakable animation
 
Material could be glass or rock or any other material, when i do stuff like this i use VHE to check entity names and materials etc.

wrecked_ 05-16-2010 21:21

Re: func_breakable animation
 
Quote:

Originally Posted by NiQu (Post 1182784)
Material could be glass or rock

Yes; I, too, am able to break rocks instantaneously with my hands while the majority of mother nature's forces cannot.

NiQu 05-16-2010 21:24

Re: func_breakable animation
 
Hmm, good point wrecked.
However HL1 != Real World.

PHP Code:

if( HL1.Engine == RealWorld )
{
    
client_print(0print_chat"What is going on!?");
    
RealWorld.Shutdown(10.0"WARNING! RealWorld is crashing in 10 seconds!");




All times are GMT -4. The time now is 03:53.

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