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

How to make a circle?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
grs4
Senior Member
Join Date: Dec 2010
Location: Poland
Old 05-03-2013 , 05:18   How to make a circle?
Reply With Quote #1

Hi, i first i'm sorry for my English. I from Poland.


I'm working on my Tower Defense Mod and I need to create circle of a range of turrets.

And I'm looking for a message which create a circle...


I use this:

PHP Code:
stock msg_beamring(idstartentendentspriteindexlifewidthColor[3], brithgness
{   
 
message_begin(MSG_ONE_UNRELIABLE ,SVC_TEMPENTITY_id//message begin   write_byte(TE_BEAMRING)    
write_short(startent)    
write_short(endent)   
write_short(spriteindex)    
write_byte(1)         
write_byte(1)    
write_byte(life)     
write_byte(width)   
write_byte(1)     
write_byte(Color[0])    
write_byte(Color[1])   
write_byte(Color[2])      
write_byte(brithgness)    
write_byte(1)  
message_end() } 
and this

PHP Code:
stock msg_circle(idvec1[3], spriteColor[3], distance)
 {    
 
message_begin(MSG_ONESVC_TEMPENTITYvec1id)    
 
write_byte21 )   
  
write_coord(vec1[0])   
  
write_coord(vec1[1])   
  
write_coord(vec1[2])   
  
write_coord(vec1[0])  
   
write_coord(vec1[1])   
  
write_coord(vec1[2] + distance)   
  
write_shortsprite )    
 
write_byte// startframe 
    
write_byte// framerate   
  
write_byte11 // life    
 
write_byte16 // width   
  
write_byte// noise    
 
write_byteColor[0] ) // r    
 
write_byteColor[1]) // g    
 
write_byteColor[2] ) // b    
 
write_byte255 //brightness     
write_byte// speed   
  
message_end() } 
and in 1 example I must create 2 entity which a spaced of towers about
(example)

1 entity: +700 units
2 entity: -700 units

and then I use TE_BEAMRING of ID this two ents.

It's work, but are problems.
The line of range is usually in the wrong place.

=====


So my question is:

there is a message that creates a circle based on Origin?


( I'm very sorry for my english, I'm 15)

Last edited by grs4; 05-03-2013 at 05:21.
grs4 is offline
didoWEE
Senior Member
Join Date: Oct 2012
Location: Bulgaria
Old 05-03-2013 , 07:08   Re: How to make a circle?
Reply With Quote #2

PHP Code:
circle(idvec1[3], spriteColor[3], distance)
{    
   
message_begin(MSG_BROADCASTSVC_TEMPENTITYvec1)    
   
write_byte(TE_BEAMCYLINDER)   
   
write_coord(vec1[0])   
   
write_coord(vec1[1])   
   
write_coord(vec1[2])   
   
write_coord(vec1[0])  
   
write_coord(vec1[1])   
   
write_coord(vec1[2] + distance)   
   
write_shortsprite )    
   
write_byte// startframe 
   
write_byte// framerate   
   
write_byte11 // life    
   
write_byte16 // width   
   
write_byte// noise    
   
write_byteColor[0] ) // r    
   
write_byteColor[1]) // g    
   
write_byteColor[2] ) // b    
   
write_byte255 //brightness     
   
write_byte// speed   
   
message_end()


Last edited by didoWEE; 05-03-2013 at 07:09.
didoWEE is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 05-03-2013 , 08:21   Re: How to make a circle?
Reply With Quote #3

Quote:
Originally Posted by didoWEE View Post
PHP Code:
circle(idvec1[3], spriteColor[3], distance)
{    
   
message_begin(MSG_BROADCASTSVC_TEMPENTITYvec1)    
   
write_byte(TE_BEAMCYLINDER)   
   
write_coord(vec1[0])   
   
write_coord(vec1[1])   
   
write_coord(vec1[2])   
   
write_coord(vec1[0])  
   
write_coord(vec1[1])   
   
write_coord(vec1[2] + distance)   
   
write_shortsprite )    
   
write_byte// startframe 
   
write_byte// framerate   
   
write_byte11 // life    
   
write_byte16 // width   
   
write_byte// noise    
   
write_byteColor[0] ) // r    
   
write_byteColor[1]) // g    
   
write_byteColor[2] ) // b    
   
write_byte255 //brightness     
   
write_byte// speed   
   
message_end()

also a life is an distance.

Last edited by .Dare Devil.; 05-03-2013 at 08:21.
.Dare Devil. is offline
grs4
Senior Member
Join Date: Dec 2010
Location: Poland
Old 05-03-2013 , 09:24   Re: How to make a circle?
Reply With Quote #4

Yes, but this ring is moving.

I was up to some "config" of "startframe", "framerate" e.t.c .. and it always moving .

( sorry for my english )


Ok to close. I've got answer in other forum. I was used sprite, sprite fixer.

Last edited by grs4; 05-03-2013 at 13:05.
grs4 is offline
grs4
Senior Member
Join Date: Dec 2010
Location: Poland
Old 05-03-2013 , 17:11   Re: How to make a circle?
Reply With Quote #5

OK, topic to close.
grs4 is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 05-05-2013 , 09:01   Re: How to make a circle?
Reply With Quote #6

Quote:
Originally Posted by grs4 View Post
Yes, but this ring is moving.

I was up to some "config" of "startframe", "framerate" e.t.c .. and it always moving .

( sorry for my english )


Ok to close. I've got answer in other forum. I was used sprite, sprite fixer.
Can you show how to do "not moving" TE_BEAMCYLINDER?
mayby link where you find your solution?
Thanks!
.Dare Devil. is offline
lazarev
Veteran Member
Join Date: Sep 2008
Old 05-06-2013 , 05:21   Re: How to make a circle?
Reply With Quote #7

one of the solutions that came up first on my mind is to make a sprite, and then change its scale

Last edited by lazarev; 05-06-2013 at 05:22.
lazarev is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 05-06-2013 , 13:17   Re: How to make a circle?
Reply With Quote #8

Quote:
Originally Posted by lazarev View Post
one of the solutions that came up first on my mind is to make a sprite, and then change its scale
but you cant do cylinder effect and also you need to a new entity for that.
( you can make cylinder effect with model but also you need to create entity )
.Dare Devil. is offline
grs4
Senior Member
Join Date: Dec 2010
Location: Poland
Old 05-08-2013 , 09:33   Re: How to make a circle?
Reply With Quote #9



@lazarev

thank you !
grs4 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 17:57.


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