Raised This Month: $ Target: $400
 0% 

Create ent between 2 points


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Emp0wer
Member
Join Date: Jul 2010
Location: Ukraine mother
Old 08-10-2010 , 16:50   Create ent between 2 points
Reply With Quote #1

Hello. I need to create a solid line ent between 2 points. But I can't understand what origin it should have and how to find size mins/maxs.
PHP Code:
create_ent(const Float:vStart[3],const Float:vEnd[3]) 

Last edited by Emp0wer; 08-10-2010 at 16:55.
Emp0wer is offline
Send a message via ICQ to Emp0wer Send a message via Skype™ to Emp0wer
Old 08-11-2010, 04:19
Emp0wer
This message has been deleted by Emp0wer.
naven
Veteran Member
Join Date: Jun 2008
Location: Poland, Cieszyn
Old 08-11-2010 , 05:03   Re: Create ent between 2 points
Reply With Quote #2

Hmm box? Check this: http://forums.alliedmods.net/showpos...64&postcount=2
__________________
naven.com.pl
"At the end of the day, there are always going to be mental disorders and people who cause violence for no other reason than the fact that they're fucked up and lost. And all we can do is try to learn from it." Corey Taylor.
naven is offline
Seta00
The Seta00 user has crashed.
Join Date: Jan 2010
Location: Berlin
Old 08-11-2010 , 05:21   Re: Create ent between 2 points
Reply With Quote #3

Quote:
Originally Posted by Emp0wer View Post
between 2 points [...] origin
Code:
origin1 = {10.0, 10.0, 10.0}
origin2 = {20.0, 22.0, 20.0}
middle = {30.0/2, 32.0/2, 30.0/2} = {15.0, 16.0, 15.0}
Seta00 is offline
Emp0wer
Member
Join Date: Jul 2010
Location: Ukraine mother
Old 08-11-2010 , 08:21   Re: Create ent between 2 points
Reply With Quote #4

Quote:
Originally Posted by Seta00 View Post
Code:
origin1 = {10.0, 10.0, 10.0}
origin2 = {20.0, 22.0, 20.0}
middle = {30.0/2, 32.0/2, 30.0/2} = {15.0, 16.0, 15.0}
I mean that ent should be like a line that connects 2 points (like a beam). But not in the middle of origins.
Emp0wer is offline
Send a message via ICQ to Emp0wer Send a message via Skype™ to Emp0wer
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 08-11-2010 , 11:34   Re: Create ent between 2 points
Reply With Quote #5

Quote:
Originally Posted by Emp0wer View Post
I mean that ent should be like a line that connects 2 points (like a beam). But not in the middle of origins.
Can you make a drawing?
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 08-11-2010 , 12:17   Re: Create ent between 2 points
Reply With Quote #6

You can make beams with a message.

For use with origins:
Quote:
#define TE_BEAMPOINTS 0 // Beam effect between two points
// write_byte(TE_BEAMPOINTS)
// write_coord(startposition.x)
// write_coord(startposition.y)
// write_coord(startposition.z)
// write_coord(endposition.x)
// write_coord(endposition.y)
// write_coord(endposition.z)
// write_short(sprite index)
// write_byte(starting frame)
// write_byte(frame rate in 0.1's)
// write_byte(life in 0.1's)
// write_byte(line width in 0.1's)
// write_byte(noise amplitude in 0.01's)
// write_byte(red)
// write_byte(green)
// write_byte(blue)
// write_byte(brightness)
// write_byte(scroll speed in 0.1's)

For use with one origin and the other entity:
Quote:
#define TE_BEAMENTPOINT 1 // Beam effect between point and entity
// write_byte(TE_BEAMENTPOINT)
// write_short(start entity)
// write_coord(endposition.x)
// write_coord(endposition.y)
// write_coord(endposition.z)
// write_short(sprite index)
// write_byte(starting frame)
// write_byte(frame rate in 0.1's)
// write_byte(life in 0.1's)
// write_byte(line width in 0.1's)
// write_byte(noise amplitude in 0.01's)
// write_byte(red)
// write_byte(green)
// write_byte(blue)
// write_byte(brightness)
// write_byte(scroll speed in 0.1's)
For use with two entities:
Quote:
#define TE_BEAMENTS 8
// write_byte(TE_BEAMENTS)
// write_short(start entity)
// write_short(end entity)
// write_short(sprite index)
// write_byte(starting frame)
// write_byte(frame rate in 0.1's)
// write_byte(life in 0.1's)
// write_byte(line width in 0.1's)
// write_byte(noise amplitude in 0.01's)
// write_byte(red)
// write_byte(green)
// write_byte(blue)
// write_byte(brightness)
// write_byte(scroll speed in 0.1's)
I belive you know how to send messages...
These are temporary beams, you need to resend them to 'appear' as they're infinite.

You can also prematurely kill a beam attached to an entity:
Quote:
#define TE_KILLBEAM 99 // Kill all beams attached to entity
// write_byte(TE_KILLBEAM)
// write_short(entity)
__________________
Hunter-Digital is offline
Emp0wer
Member
Join Date: Jul 2010
Location: Ukraine mother
Old 08-11-2010 , 12:23   Re: Create ent between 2 points
Reply With Quote #7

Quote:
Originally Posted by Hunter-Digital View Post
You can make beams with a message.

For use with origins:



For use with one origin and the other entity:


For use with two entities:


I belive you know how to send messages...
These are temporary beams, you need to resend them to 'appear' as they're infinite.

You can also prematurely kill a beam attached to an entity:
Quote:
Originally Posted by joropito View Post
Can you make a drawing?
Thx but, I need to create invisible solid line, that's not what beam is

Last edited by Emp0wer; 08-11-2010 at 12:45.
Emp0wer is offline
Send a message via ICQ to Emp0wer Send a message via Skype™ to Emp0wer
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 08-11-2010 , 16:35   Re: Create ent between 2 points
Reply With Quote #8

Quote:
Originally Posted by Emp0wer View Post
Thx but, I need to create invisible solid line, that's not what beam is
I mean to make a drawing to understand what you want to do.

If you need a solid line between two points (origin is not a definition) the you should work with entities sizes. You can put an invisible entity with the size of the line you want and make a visible beam.
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
Emp0wer
Member
Join Date: Jul 2010
Location: Ukraine mother
Old 08-11-2010 , 18:31   Re: Create ent between 2 points
Reply With Quote #9

SOLVED I find the way to do that.

Last edited by Emp0wer; 08-11-2010 at 19:19.
Emp0wer is offline
Send a message via ICQ to Emp0wer Send a message via Skype™ to Emp0wer
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 08-11-2010 , 19:21   Re: Create ent between 2 points
Reply With Quote #10

What exacly do you need this for ? I can't get what you need with min/max and a beam.

Two points are two origins in a map OR they can be two info_target entities that have no model, therefore they act as pointers and you can hook a beam from one to another OR just from one origin to another using a message in my post above.

If that's not it, learn to explain better in english.
__________________
Hunter-Digital is offline
Reply



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 21:55.


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