View Single Post
Halt
Senior Member
Join Date: Jan 2015
Location: Black Mesa
Old 10-19-2017 , 13:07   Re: Help with Creating entity
Reply With Quote #10

Here's an example from my plugin, keep in mind I'm storing the entity in an array so its a bit different.

PHP Code:
    ArtillarySmoke[0] = CreateEntityByName("env_smokestack");
    
DispatchKeyValue(ArtillarySmoke[0], "InitialState""1");
    
DispatchKeyValue(ArtillarySmoke[0], "SpreadSpeed""10");
    
DispatchKeyValue(ArtillarySmoke[0], "Speed""15");
    
DispatchKeyValue(ArtillarySmoke[0], "StartSize""8");
    
DispatchKeyValue(ArtillarySmoke[0], "EndSize""16");
    
DispatchKeyValue(ArtillarySmoke[0], "Rate""10");
    
DispatchKeyValue(ArtillarySmoke[0], "JetLength""150");
    
DispatchKeyValue(ArtillarySmoke[0], "WindAngle""23");
    
DispatchKeyValue(ArtillarySmoke[0], "WindSpeed""10");
    
DispatchKeyValue(ArtillarySmoke[0], "rendercolor""233 3 9");
    
DispatchKeyValue(ArtillarySmoke[0], "twist""5");
    
DispatchKeyValue(ArtillarySmoke[0], "roll""3");
    
DispatchKeyValue(ArtillarySmoke[0], "SmokeMaterial""particle/SmokeStack.vmt");
    
DispatchSpawn(ArtillarySmoke[0]);
    
TeleportEntity(ArtillarySmoke[0], ArtillarySmokePos1NULL_VECTORNULL_VECTOR);
    
AcceptEntityInput(ArtillarySmoke[0], "TurnOn"); 
Halt is offline