AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to make a circle? (https://forums.alliedmods.net/showthread.php?t=215037)

grs4 05-03-2013 05:18

How to make a circle?
 
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)

didoWEE 05-03-2013 07:08

Re: How to make a circle?
 
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()



.Dare Devil. 05-03-2013 08:21

Re: How to make a circle?
 
Quote:

Originally Posted by didoWEE (Post 1944914)
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.

grs4 05-03-2013 09:24

Re: How to make a circle?
 
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.

grs4 05-03-2013 17:11

Re: How to make a circle?
 
OK, topic to close.

.Dare Devil. 05-05-2013 09:01

Re: How to make a circle?
 
Quote:

Originally Posted by grs4 (Post 1944991)
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!

lazarev 05-06-2013 05:21

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

.Dare Devil. 05-06-2013 13:17

Re: How to make a circle?
 
Quote:

Originally Posted by lazarev (Post 1946791)
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 )

grs4 05-08-2013 09:33

Re: How to make a circle?
 
http://www.minifirefox.com/browse.ph...uZw%3D%3D&b=13

@lazarev

thank you ! :)


All times are GMT -4. The time now is 07:27.

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