Raised This Month: $ Target: $400
 0% 

Make sound on triplaser mode


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wicho
Veteran Member
Join Date: Feb 2012
Location: GuateAmala
Old 07-29-2014 , 22:42   Make sound on triplaser mode
Reply With Quote #1

Hi everybody, well i use the namemodes ot_207 my question is in what part of the code i need to edit to make a especial sound but only on triplaser mode and in the smoke nade, i mean make a sound when the owner or the opposing team touch the line of triplaser mode in smoke nade only.. thx in advance

code:
Attached Files
File Type: sma Get Plugin or Get Source (nademodes.sma - 479 views - 139.5 KB)
wicho is offline
wicho
Veteran Member
Join Date: Feb 2012
Location: GuateAmala
Old 08-17-2014 , 20:59   Re: Make sound on triplaser mode
Reply With Quote #2

Bump, someone know?

Is in this part or not?

PHP Code:
case TRIP_ATTACHED:
                {
                    static 
loop[6][2] = { {21}, {2, -1}, {01}, {0, -1}, {11}, {1, -1} }
                    
// Search in order: +Z axis -Z axis +X axis -X axis +Y axis -Y axis
                    
                    
for (new i6i++)
                    {
                        
xs_vec_copy(originpoint)
                        
                        
point[loop[i][0]] = origin[loop[i][0]] + (2.0 float(loop[i][1]))
                        
                        
engfunc(EngFunc_TraceLineoriginpointIGNORE_MONSTERSentg_ptrace[TH_TRIP])
                        
                        
get_tr2(g_ptrace[TH_TRIP], TR_flFractionfraction)
                        
                        if (
fraction 1.0)
                        {
                            
hit get_tr2(g_ptrace[TH_TRIP], TR_pHit)
                            
                            if (!
is_attachable_surface(hit))
                            {
                                
set_grenade_type(entNADE_DUD)
                                return 
HAM_IGNORED
                            
}
                            
                            
get_tr2(g_ptrace[TH_TRIP], TR_vecPlaneNormalnormal)
                            
                            
set_trip_grenade_attached_to(enthit)
                            
                            
// Calculate and store fly velocity.
                            
xs_vec_mul_scalar(normalfly_speedtemp)
                            
set_trip_grenade_fly_velocity(enttemp)
                            
                            
// Calculate and store endpoint.
                            
xs_vec_mul_scalar(normaldetect_distancetemp)
                            
xs_vec_add(temporiginend)
                            
                            
// Trace to it
                            
engfunc(EngFunc_TraceLineoriginendIGNORE_MONSTERSentg_ptrace[TH_TRIP])
                            
get_tr2(g_ptrace[TH_TRIP], TR_flFractionfraction)
                            
                            
// Final endpoint with no possible wall collision
                            
xs_vec_mul_scalar(normal, (detect_distance fraction), temp)
                            
xs_vec_add(temporiginend)
                            
set_trip_grenade_end_origin(entend)
                            
                            
xs_vec_mul_scalar(temp0.5temp)
                            
xs_vec_add(temporigintemp)
                            
set_trip_grenade_middle_origin(enttemp)
                            
                            
set_trip_grenade_arm_time(entarm_time)
                            
                            
play_sound(entDEPLOY)
                            
                            
entity_set_vector(entEV_VEC_velocityFloat:{0.00.00.0}) // Stop if from moving
                            
                            
entity_set_int(entEV_INT_sequence0// Otherwise, grenade might make wierd motions.
                            
                            
vector_to_angle(normalnormal)
                            
                            
entity_set_vector(entEV_VEC_anglesnormal)
                            
                            
set_trip_grenade_mode(entTRIP_WAITING)
                            
                            
set_task(0.1"trip_activation"ent)
                            
                            return 
HAM_IGNORED
                        
}
                    }
                    
                    
// If we reach here, we have serious problems. This means that the grenade hit something like a func_breakable
                    // that disappeared before the scan was able to take place. Now, the grenade is floating in mid air. So we just
                    // kaboom it!!!
                    
                    
make_explode(ent)
                    
                    if (
NadeRace:get_grenade_race(ent) == GRENADE_SMOKEGREN)
                    {
                        
entity_set_int(entEV_INT_flagsentity_get_int(entEV_INT_flags) | FL_ONGROUND)
                    }
                    
                    return 
HAM_IGNORED
                


Last edited by wicho; 08-17-2014 at 22:22.
wicho 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 13:20.


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