View Single Post
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