Veteran Member
Join Date: Mar 2007
Location: Somewhere near you!!!
|
01-28-2020
, 08:16
env_beam didnīt recognize endpoint....
|
#1
|
PHP Code:
for (int i = 1; i <= 12; i++) { // read the vector from your config file... Format(Position, sizeof(Position), "Position%i", i); KvJumpToKey(kvNew, Position, true); KvGetVector(kvNew, NULL_STRING, vecs); KvRewind(kvNew);
int flame = CreateEntityByName("env_steam"); char startName[32]; Format(startName, sizeof(startName), "start_%s", flame); DispatchKeyValue(flame, "targetname", startName); DispatchKeyValue(flame,"SpawnFlags", "1"); DispatchKeyValue(flame,"Type", "0"); DispatchKeyValue(flame,"InitialState", "1"); DispatchKeyValue(flame,"Spreadspeed", "10"); DispatchKeyValue(flame,"Speed", "30"); DispatchKeyValue(flame,"Startsize", "1"); DispatchKeyValue(flame,"EndSize", "5"); DispatchKeyValue(flame,"Rate", "15"); DispatchKeyValue(flame,"JetLength", "300"); DispatchKeyValue(flame,"RenderColor", "0 255 80"); DispatchKeyValue(flame,"RenderAmt", "50"); DispatchKeyValue(flame,"Angles", "270 0 0"); DispatchSpawn(flame); if(i== 1) { PrintToChatAll("Vector: %f : %f : %f", vecs[0], vecs[1], vecs[2]); TeleportEntity(flame, vecs, NULL_VECTOR, NULL_VECTOR); AcceptEntityInput(flame, "TurnOn"); } int flame2 = CreateEntityByName("env_steam"); char endName[32]; Format(endName, sizeof(endName), "end_%s", flame2); DispatchKeyValue(flame2, "targetname", endName); DispatchKeyValue(flame2,"SpawnFlags", "1"); DispatchKeyValue(flame2,"Type", "0"); DispatchKeyValue(flame2,"InitialState", "1"); DispatchKeyValue(flame2,"Spreadspeed", "10"); DispatchKeyValue(flame2,"Speed", "30"); DispatchKeyValue(flame2,"Startsize", "1"); DispatchKeyValue(flame2,"EndSize", "5"); DispatchKeyValue(flame2,"Rate", "15"); DispatchKeyValue(flame2,"JetLength", "300"); DispatchKeyValue(flame2,"RenderColor", "255 255 80"); DispatchKeyValue(flame2,"RenderAmt", "50"); DispatchKeyValue(flame2,"Angles", "270 0 0"); DispatchSpawn(flame2); if(i== 2) { PrintToChatAll("Vector: %f : %f : %f", vecs[0], vecs[1], vecs[2]); TeleportEntity(flame2, vecs, NULL_VECTOR, NULL_VECTOR); AcceptEntityInput(flame2, "TurnOn"); } int beam = CreateEntityByName( "env_beam" ); DispatchKeyValue(beam, "texture", "sprites/laserbeam.spr"); DispatchKeyValue(beam, "renderamt", "100" ); DispatchKeyValue(beam, "rendermode", "0" ); DispatchKeyValue(beam, "rendercolor", "255 255 255" ); DispatchKeyValue(beam, "life", "10" ); DispatchKeyValue(beam, "BoltWidth", "10"); DispatchKeyValue(beam, "NoiseAmplitude", "0"); DispatchKeyValue(beam, "LightningStart", startName); DispatchKeyValue(beam, "LightningEnd", endName); DispatchSpawn(beam); AcceptEntityInput(beam,"TurnOn"); }
the problem is that the beam is created 2 times(one at the first vector and one at the second vector , both end up somewhere in the map)and didnīt recognize the endpoint in this case(beam, "LightningEnd", endName);
Any Ideas?
__________________
Last edited by andi67; 01-28-2020 at 08:27.
|
|