Creating env_beam problem
I'm trying to create an env_beam just like you would when making one in hammer editor. Using 3 ents - the start point, end point, and beam ent.
I've tried so many different things using both fakemeta and engine to get this working. If you run the following code you will see it makes both end points and the beam sprite, but the beam sprite doesn't connect to the points (note: I made the end points a sprite just so I could see them). PHP Code:
[img]http://img190.**************/img190/7384/beamk.jpg[/img] Here is what I want it to produce: [img]http://img212.**************/img212/2069/goodbeam.jpg[/img] Anyone have any ideas how to make this? |
Re: Creating env_beam problem
This could help you : http://svn.alliedmods.net/viewvc.cgi...p&root=amxmodx
|
Re: Creating env_beam problem
Let me search few minutes, I have what you want somewhere in my computer.
|
Re: Creating env_beam problem
1 Attachment(s)
Here. You just need, FX_BeamPoints() and UTIL_RelinkBeam(). Life is infinite, it means you need to execute just one time the code. To remove the beam, just kill the beam. Since you will probably check if someone passes the beam, I would suggest to add a check if the beam (entity) is still then the redraw it, because on specific situations the beam could be removed. Btw, "beam" is not the same as "env_beam". "beam" is more a simplified version of env_beam but allowing to use different type of beam : Point -> Point, Point -> Entity, Entity -> Entity, Point -> Direction and there are no spawn flags. "env_beam" seems to be only between entity name, with more options and spawn flags. In your case you should use "beam". If you want to use "env_beam" and the provided options, you would need to create 2 entities like "info_target", setting the right origin and targetname.
|
Re: Creating env_beam problem
Alright thanks a lot both Arkshine and Connor :)
I never knew entity "beam" even existed, maybe I should look around the hl1 source more ;) |
| All times are GMT -4. The time now is 18:24. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.