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

How to make a circle?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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 15:38.


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