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

[Help] beam entity.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
abdobiskra
Veteran Member
Join Date: Jul 2014
Location: Algeria
Old 11-04-2018 , 08:47   [Help] beam entity.
Reply With Quote #1

Hi, I have two questions about that :
Im using this [INC] Beam Entities
1) How to set beam life timeout.


2) How to create a point beam.
What I want:
I want to creat similar like this beam in this image:



author said when i ask him about it :
Quote:
I have no source code.
As I remember, there are two sprites. 1st - beam sprite. I used default laser sprite.
2nd - glow sprite.
__________________

Last edited by abdobiskra; 11-04-2018 at 08:48.
abdobiskra is offline
Send a message via Skype™ to abdobiskra
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 11-04-2018 , 09:56   Re: [Help] beam entity.
Reply With Quote #2

Have you tried this? There's a video preview, so at least one of those functions is probably what you need.
__________________

Last edited by OciXCrom; 11-04-2018 at 09:57.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
abdobiskra
Veteran Member
Join Date: Jul 2014
Location: Algeria
Old 11-04-2018 , 11:12   Re: [Help] beam entity.
Reply With Quote #3

Thx, But Not exactly what I'm looking for.
__________________
abdobiskra is offline
Send a message via Skype™ to abdobiskra
abdobiskra
Veteran Member
Join Date: Jul 2014
Location: Algeria
Old 11-07-2018 , 13:14   Re: [Help] beam entity.
Reply With Quote #4

is there an example of an entity to change its Sprite color?
i try rendercolor but not work ?
PHP Code:
        new entity create_entity("info_target")
            
            
            
entity_set_stringentityEV_SZ_classname"dot" );
            
entity_set_model(entity"sprites/glow02.spr")
            
entity_set_size(entityFloat:{-3.0,-3.0,-3.0}, Float:{3.0,3.0,3.0} );
            
entity_set_intentityEV_INT_solidSOLID_TRIGGER );
            
            
set_pev(entitypev_scale0.22)
            
            
entity_set_int(entityEV_INT_rendermodekRenderTransAdd)
            
entity_set_int(entityEV_INT_renderfxkRenderFxNone)
            
            
entity_set_vectorentityEV_VEC_rendercolor, {25500} );
DispatchSpawn(entity
__________________

Last edited by abdobiskra; 11-07-2018 at 13:15.
abdobiskra is offline
Send a message via Skype™ to abdobiskra
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 11-08-2018 , 06:22   Re: [Help] beam entity.
Reply With Quote #5

Register think in the beam entity and call remove_entity.
Start the entity as BEAM_ENTPOINT (Beam_PointEntInit). Set start pos to where you want the laser to end and set start entity in laser mine entity.
__________________








CrazY. is offline
abdobiskra
Veteran Member
Join Date: Jul 2014
Location: Algeria
Old 11-08-2018 , 15:14   Re: [Help] beam entity.
Reply With Quote #6

I think I made a mistake in the sequence now that its color has changed
Now I want to know How to set beam life timeout?
i found this offset :
Quote:
float m_flBeamLength 173
I tried to minimize it but it did not work!
PHP Code:
set_pdata_float(get_pdata_cbase(entm_pBeam5), m_flBeamLength1.0 ,4// ent = tripmine 
__________________
abdobiskra is offline
Send a message via Skype™ to abdobiskra
abdobiskra
Veteran Member
Join Date: Jul 2014
Location: Algeria
Old 12-05-2018 , 06:15   Re: [Help] beam entity.
Reply With Quote #7

I dont understand why the new entity is not compatible with mine angles when i set "origin[1] -= 10.0"?



My idea to be a little far away like :

https://imgur.com/a/Ln8yJj0

My code ?

PHP Code:
        new entity create_entity("info_target")
    
        
entity_set_stringentityEV_SZ_classname"dot_glow" );
        
entity_set_model(entity"sprites/glow02.spr")
        
entity_set_intentityEV_INT_solidSOLID_TRIGGER );
        
        
set_pev(entitypev_renderfxkRenderFxNone)
        
set_pev(entitypev_rendermodekRenderTransAdd)
        
set_pev(entitypev_renderamt255.0)
        
set_pev(entitypev_rendercolorFloat:{255.00.00.0}) 
        
set_pev(entitypev_scale0.19)
            
        
//static Float:norigin[3];
        
static Float:vangles[3];

        
pev(entpev_v_anglevangles)// ent = tripmine 
        
set_pev(entitypev_v_anglevangles
        
        
origin[1] -= 10.0 // i want her to be a little far away
        
        
engfunc(EngFunc_SetOriginentityorigin);
        
        
//DispatchSpawn(entity)
            
                  // spawn beam ent
        
RelinkBeam(beamvecEndvecEndorigin);
        
        
set_pev(entTRIPMINE_FRACTION_OLDfraction); 
__________________

Last edited by abdobiskra; 12-05-2018 at 13:47.
abdobiskra is offline
Send a message via Skype™ to abdobiskra
JocAnis
Veteran Member
Join Date: Jun 2010
Old 12-05-2018 , 08:16   Re: [Help] beam entity.
Reply With Quote #8

It depends where you put that entity on the map... If changing origin[1] didnt work there, then origin[2] Will do the job for you (cuz [3] is axis for height)... So the solution should be: detect entity's angle, and based on it - add 10. 0 units to x or y coordinate.. Sorry if i missunderstood your post
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis is offline
abdobiskra
Veteran Member
Join Date: Jul 2014
Location: Algeria
Old 12-05-2018 , 11:26   Re: [Help] beam entity.
Reply With Quote #9

Quote:
Originally Posted by JocAnis View Post
So the solution should be: detect entity's angle, and based on it - add 10. 0 units to x or y coordinate.. Sorry if i missunderstood your post
Yes, here in this part :
Quote:
pev(ent, pev_v_angle, vangles)// ent = tripmine
set_pev(entity, pev_v_angle, vangles)

origin[1] -= 10.0 // i want her to be a little far away
__________________

Last edited by abdobiskra; 12-05-2018 at 11:27.
abdobiskra is offline
Send a message via Skype™ to abdobiskra
JocAnis
Veteran Member
Join Date: Jun 2010
Old 12-05-2018 , 18:20   Re: [Help] beam entity.
Reply With Quote #10

By doing just that i dont think you would know if you need to change x or y axis.. Maybe something to do with vectors, velocity.. Idk but i would like to know too, in which way to do that
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis 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 04:24.


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