Raised This Month: $ Target: $400
 0% 

NadeModes, smokegrenade stick


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
HowToRuski
Senior Member
Join Date: Feb 2019
Location: Hungary
Old 08-28-2022 , 14:25   NadeModes, smokegrenade stick
Reply With Quote #1

Hello, so im trying to make smoke grenade stick to wall when its on IMPACT mode, someone can help?
I have this code right here
Im using nademodes plugin
PHP Code:
case NADE_IMPACT:
        {
            if (
is_solid(touched))
            {
                
make_explode(toucher)
                
                
entity_set_float(toucherEV_FL_nextthinkget_gametime() + 0.001)
                
                if (
NadeRace:get_grenade_race(toucher) == GRENADE_SMOKEGREN)
                {
                    
entity_set_int(toucherEV_INT_flagsentity_get_int(toucherEV_INT_flags) | FL_ONGROUND)
                }
            }
        } 
i changed the
entity_set_int(toucher, EV_INT_flags, entity_get_int(toucher, EV_INT_flags) | FL_ONGROUND)

to

entity_set_int(toucher, EV_INT_movetype, MOVETYPE_NONE)

but it doesnt seem to work, the grenade sticks to the wall, but is like rapidly moving and doesnt explode
but works great when it touches the ground

Last edited by HowToRuski; 08-28-2022 at 15:09.
HowToRuski is offline
 



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 15:40.


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