Raised This Month: $12 Target: $400
 3% 

env_beam didnīt recognize endpoint....


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
andi67
Veteran Member
Join Date: Mar 2007
Location: Somewhere near you!!!
Old 01-28-2020 , 08:16   env_beam didnīt recognize endpoint....
Reply With Quote #1

PHP Code:
    for (int i 1<= 12i++)
    {
        
// read the vector from your config file...
        
Format(Positionsizeof(Position), "Position%i"i);
        
KvJumpToKey(kvNewPositiontrue);    
        
KvGetVector(kvNewNULL_STRINGvecs);            
        
KvRewind(kvNew);            

        
        
int flame CreateEntityByName("env_steam");        
        
char startName[32];
        
Format(startNamesizeof(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(flamevecsNULL_VECTORNULL_VECTOR);
            
AcceptEntityInput(flame"TurnOn");    
        }
        
        
int flame2 CreateEntityByName("env_steam");
        
char endName[32];
        
Format(endNamesizeof(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(flame2vecsNULL_VECTORNULL_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?
__________________
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!!!<<

Last edited by andi67; 01-28-2020 at 08:27.
andi67 is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 01-29-2020 , 15:17   Re: env_beam didnīt recognize endpoint....
Reply With Quote #2

PHP Code:
DispatchKeyValueVector(beam"CoordMP"vecs);
SetEntPropVector(beamProp_Send"m_vecEndPos"vecs);
SetEntPropVector(beamProp_Data,"m_hEndEntity",  vecs); 
Try any of those maybe. Im guessing it's pointing to 0,0,0 when you say "somewhere in the map"

Also, you're only teleporting env_steam when the "i" index is 1, and 2, but every other time you're creating them all without coords, eg 0,0,0 I guess. And the beam is created 12 times, not 2 lol. Fix all that and it might work as expected without the above code I put.
__________________

Last edited by Silvers; 01-29-2020 at 15:21.
Silvers is offline
andi67
Veteran Member
Join Date: Mar 2007
Location: Somewhere near you!!!
Old 01-29-2020 , 15:49   Re: env_beam didnīt recognize endpoint....
Reply With Quote #3

Thx, well the env_steam(both) are spawned on the right position also the vecs are printed out correctly , from what i know is that this

DispatchKeyValue(beam, "LightningStart", startName);
DispatchKeyValue(beam, "LightningEnd", endName);

should set the startentity i DispatchKeyValue(beam, "LightningStart", startName); and the endentity DispatchKeyValue(beam, "LightningEnd", endName);

Iīm gonna try your sugesstions out.....thx
__________________
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
Kco
New Member
Join Date: Sep 2020
Old 09-21-2020 , 01:08   Re: env_beam didnīt recognize endpoint....
Reply With Quote #4

Quote:
Originally Posted by andi67 View Post
Thx, well the env_steam(both) are spawned on the right position also the vecs are printed out correctly , from what i know is that this

DispatchKeyValue(beam, "LightningStart", startName);
DispatchKeyValue(beam, "LightningEnd", endName);

should set the startentity i DispatchKeyValue(beam, "LightningStart", startName); and the endentity DispatchKeyValue(beam, "LightningEnd", endName);

Iīm gonna try your sugesstions out.....thx

how could you finally solve this?
Kco is offline
Reply


Thread Tools
Display Modes

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 19:03.


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