Raised This Month: $ Target: $400
 0% 

Moving env_fire with player does not work...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
andi67
Veteran Member
Join Date: Mar 2007
Location: Somewhere near you!!!
Old 07-23-2015 , 13:17   Moving env_fire with player does not work...
Reply With Quote #1

So I´m getting a little bit lost atm. , I´m trying to attach an env_fire to the forward bone , the fire is spawned but does not move with the player , here is the code:#

Code:
        new client = GetClientOfUserId(GetEventInt(event, "userid"));
        
        new Float:vAngles[3];
        new Float:vOrigin[3];
                        
        new String:tName[128];
                        
        GetClientEyePosition(client, vOrigin);
        GetClientEyeAngles(client, vAngles);
        
        new String:flame_name[128];
        Format(flame_name, sizeof(flame_name), "Flame%i", client);                
        new ent = CreateEntityByName("env_fire");
        DispatchKeyValue(ent, "targetname", flame_name);
        DispatchKeyValue(ent, "parentname", tName);
        DispatchKeyValue(ent, "damagescale", "-1.0");
        DispatchKeyValue(ent, "firesize", "30");
        DispatchKeyValue(ent, "spawnflags", "4");    
        DispatchSpawn(ent);                
        TeleportEntity(ent, vOrigin, vAngles, NULL_VECTOR);                
        SetVariantString(tName);
        SetVariantString("!activator");                    
        AcceptEntityInput(ent, "SetParent", client, ent, 0);
        SetVariantString("forward");                
        AcceptEntityInput(ent, "SetParentAttachment", client, client, 0);
        ActivateEntity(ent);
Game is CSGO.
__________________
Waiting for HL3,Day of Defeat3 ,but will it ever come? So I'm gonna play COD WW2.>>>>SM_SKINCHOOSER<<<<
>>You need Models for DODS/CSS/CSGO , than click here!!!<<
andi67 is offline
Michalplyoutube
Veteran Member
Join Date: Jan 2013
Location: Tank Carrier in Mannhatt
Old 07-23-2015 , 13:38   Re: Moving env_fire with player does not work...
Reply With Quote #2

Code seems fine

SetParent before dispatching maybe?

Remove setvariantstring before !activator set vairant string
__________________
The plugin developer of TF2BWR Reborn
And a TF2 Player
Michalplyoutube is offline
andi67
Veteran Member
Join Date: Mar 2007
Location: Somewhere near you!!!
Old 07-23-2015 , 15:11   Re: Moving env_fire with player does not work...
Reply With Quote #3

Thanks for reply but it doesn´t move.....
I found in another thread something that does exactly the same like the first code I posted but the problem is the same , it should have worked before maybe an update has broken this.....

Code:
#pragma semicolon 1

#include <sourcemod>
#include <sdktools>

public OnPluginStart()
{
    RegConsoleCmd("sm_test", test);
}

public Action:test(client, args)
{
    new ent = CreateEntityByName("_firesmoke");
    if(ent != -1)
    {
        DispatchSpawn(ent);

        new Float:origin[3];
        GetClientEyePosition(client, origin);
        TeleportEntity(ent, origin, NULL_VECTOR, NULL_VECTOR);
        SetVariantString("!activator");
        AcceptEntityInput(ent, "SetParent", client);
    }
    return Plugin_Handled;
}
Thread: https://forums.alliedmods.net/showthread.php?t=147618
__________________
Waiting for HL3,Day of Defeat3 ,but will it ever come? So I'm gonna play COD WW2.>>>>SM_SKINCHOOSER<<<<
>>You need Models for DODS/CSS/CSGO , than click here!!!<<
andi67 is offline
andi67
Veteran Member
Join Date: Mar 2007
Location: Somewhere near you!!!
Old 07-23-2015 , 16:39   Re: Moving env_fire with player does not work...
Reply With Quote #4

Just checked it on DODS and it works so seems to be broken in CSGO...
__________________
Waiting for HL3,Day of Defeat3 ,but will it ever come? So I'm gonna play COD WW2.>>>>SM_SKINCHOOSER<<<<
>>You need Models for DODS/CSS/CSGO , than click here!!!<<
andi67 is offline
Miu
Veteran Member
Join Date: Nov 2013
Old 07-23-2015 , 17:16   Re: Moving env_fire with player does not work...
Reply With Quote #5

Wouldn't be the first time
Miu is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 07-23-2015 , 19:31   Re: Moving env_fire with player does not work...
Reply With Quote #6

ent_fire doesn't parent in CSGO

I use IgnitePlayer or something like that without checking.
__________________
Neuro Toxin is offline
andi67
Veteran Member
Join Date: Mar 2007
Location: Somewhere near you!!!
Old 07-24-2015 , 05:12   Re: Moving env_fire with player does not work...
Reply With Quote #7

IgnitePlayer is no option since I only want to set the Head on fire , someone knows a similar effect like env_fire?
__________________
Waiting for HL3,Day of Defeat3 ,but will it ever come? So I'm gonna play COD WW2.>>>>SM_SKINCHOOSER<<<<
>>You need Models for DODS/CSS/CSGO , than click here!!!<<
andi67 is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 07-24-2015 , 06:32   Re: Moving env_fire with player does not work...
Reply With Quote #8

Particles might be the way to go
__________________
Neuro Toxin is offline
Morell
AlliedModders Donor
Join Date: Jun 2010
Location: World
Old 07-24-2015 , 08:52   Re: Moving env_fire with player does not work...
Reply With Quote #9

If you just want the effect, spawn an info_particle_system and use env_fire_large or _medium or _tiny (and add _smoke if you want smoke) as the effect name.

Parenting the particle system should work normally, env_fire has been broken completely in CS:GO.
__________________
Morell is offline
andi67
Veteran Member
Join Date: Mar 2007
Location: Somewhere near you!!!
Old 07-24-2015 , 09:34   Re: Moving env_fire with player does not work...
Reply With Quote #10

I opened a ticket :
http://www.pwnsource.com/tickets/env...ntitys-players

I think about the particlesystem......
__________________
Waiting for HL3,Day of Defeat3 ,but will it ever come? So I'm gonna play COD WW2.>>>>SM_SKINCHOOSER<<<<
>>You need Models for DODS/CSS/CSGO , than click here!!!<<
andi67 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 00:38.


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