Raised This Month: $ Target: $400
 0% 

[CS:GO]Moving Fire


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
th7nder
Senior Member
Join Date: Oct 2014
Old 02-04-2015 , 12:16   [CS:GO]Moving Fire
Reply With Quote #1

Hi guys! I'm trying to create fireball, everything works, but when i set velocity to it, it doesn't move. What can I do?
Code:
    GetClientEyePosition(client, vOrigin);
    GetClientEyeAngles(client, vAngles);
    
    GetAngleVectors(vAngles, AnglesVec, NULL_VECTOR, NULL_VECTOR);
    vAngles[0] *= 1500.0;
    vAngles[1] *= 1500.0;
    vAngles[2] *= 1500.0;

    

    new flame = CreateEntityByName("env_steam");
    DispatchKeyValue(flame,"SpawnFlags", "64");
    DispatchKeyValue(flame,"Type", "0");
    DispatchKeyValue(flame,"InitialState", "1");
    DispatchKeyValue(flame,"Spreadspeed", "10");
    DispatchKeyValue(flame,"Speed", "200");
    DispatchKeyValue(flame,"Startsize", "35");
    DispatchKeyValue(flame,"EndSize", "35");
    DispatchKeyValue(flame,"Rate", "50");
    DispatchKeyValue(flame,"JetLength", "35");
    DispatchKeyValue(flame,"RenderColor", "180 71 8");
    DispatchKeyValue(flame,"RenderAmt", "180");
    SetEntityMoveType(flame, MOVETYPE_FLYGRAVITY);
    DispatchSpawn(flame);
    ActivateEntity(flame);
    TeleportEntity(flame, vOrigin, NULL_VECTOR, vAngles);
    AcceptEntityInput(flame, "TurnOn");
th7nder is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 02-04-2015 , 15:51   Re: [CS:GO]Moving Fire
Reply With Quote #2

The third post should help.

https://forums.alliedmods.net/showthread.php?t=255780
__________________
Neuro Toxin is offline
th7nder
Senior Member
Join Date: Oct 2014
Old 02-05-2015 , 04:51   Re: [CS:GO]Moving Fire
Reply With Quote #3

You meant enabling physics on entity? It's done by physicsmosde or what? I hope that u cana answer to that (;
th7nder is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 02-05-2015 , 15:23   Re: [CS:GO]Moving Fire
Reply With Quote #4

No. I was more thinking the calculations to create the velocity vector.

Of course you want to add z into the velocities
__________________
Neuro Toxin is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 02-05-2015 , 15:26   Re: [CS:GO]Moving Fire
Reply With Quote #5

I was also thinking env_steam may not support velocity (more then likely). You might have to parent it to something that does and apply velocity to it.
__________________
Neuro Toxin is offline
th7nder
Senior Member
Join Date: Oct 2014
Old 02-05-2015 , 17:06   Re: [CS:GO]Moving Fire
Reply With Quote #6

So, how do I set parent entity to entity?
th7nder is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 02-05-2015 , 21:09   Re: [CS:GO]Moving Fire
Reply With Quote #7

There is a net prop or you can dispatch it before creating the entity. Not sure right now as I'm at work.
__________________
Neuro Toxin 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 07:52.


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