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

Perfect Hemisphere with TE_SetupBeamRingPoint


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Skippy
Senior Member
Join Date: Nov 2011
Old 12-09-2013 , 23:58   Perfect Hemisphere with TE_SetupBeamRingPoint
Reply With Quote #1

I'm trying to create a perfect hemisphere with the TE_SetupBeamRingPoint but I'm having problems with what values of the radius and origin should change. So far I have a timer that increases the the radius and origin at the same rate (Linear) which is making it form a cone. I'm wondering how I make these values able to form a perfect hemisphere.
__________________
Plugins:
[Any] Aim Menu

Want a TF2 plugin? Feel free to pm me to discuss it.
Skippy is offline
striker07
Veteran Member
Join Date: Mar 2012
Location: Solar System/Earth/Belgi
Old 12-10-2013 , 08:51   Re: Perfect Hemisphere with TE_SetupBeamRingPoint
Reply With Quote #2

i doubt that is possible my guess would be to make several beamringpoints but each one a bit higher and endradius a bit smaller, but i wouldnt be surprised if that would be a bit intensive for the server to make it look perfect.

you'll probably have to make that tempent yourself from scratch or make a sprite
__________________

Working on:
[CSGO/CSS] Mmorpg - an extensive XP/level modulair platform
Progress: [♣♣♣♣♣♣♣|♣♣♣]

Last edited by striker07; 12-10-2013 at 08:53.
striker07 is offline
Skippy
Senior Member
Join Date: Nov 2011
Old 12-10-2013 , 14:06   Re: Perfect Hemisphere with TE_SetupBeamRingPoint
Reply With Quote #3

Quote:
Originally Posted by striker07 View Post
i doubt that is possible my guess would be to make several beamringpoints but each one a bit higher and endradius a bit smaller, but i wouldnt be surprised if that would be a bit intensive for the server to make it look perfect.

you'll probably have to make that tempent yourself from scratch or make a sprite
I've been able to almost do this. And I'm making one beam move up and down in the cone shape. I need the single beam to form a sphere instead of a cone.
__________________
Plugins:
[Any] Aim Menu

Want a TF2 plugin? Feel free to pm me to discuss it.
Skippy is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 12-11-2013 , 08:39   Re: Perfect Hemisphere with TE_SetupBeamRingPoint
Reply With Quote #4

The server could care less, those things are all handled by the client.
There is a limit on tes though, around 400 or so. It's pretty hard to reach unless you are firing them off like machineguns. Spose I remember someone was trying to make a laser scanner like thing that could project onto a wall, lr use sprites, but the te limit would limit the resolution down to around to mabye 600 lines or so if you interlace.

I think something like this was in mind:

__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
Skippy
Senior Member
Join Date: Nov 2011
Old 12-11-2013 , 17:33   Re: Perfect Hemisphere with TE_SetupBeamRingPoint
Reply With Quote #5

Quote:
Originally Posted by friagram View Post
The server could care less, those things are all handled by the client.
There is a limit on tes though, around 400 or so. It's pretty hard to reach unless you are firing them off like machineguns. Spose I remember someone was trying to make a laser scanner like thing that could project onto a wall, lr use sprites, but the te limit would limit the resolution down to around to mabye 600 lines or so if you interlace.

I think something like this was in mind:

Except I need a single beam ring to move into a shape of a hemisphere. Moving the single beam ring up and down isn't a problem for me. The problem is how to get it to form a perfect hemisphere and not have it form a cone.
__________________
Plugins:
[Any] Aim Menu

Want a TF2 plugin? Feel free to pm me to discuss it.

Last edited by Skippy; 12-11-2013 at 17:35.
Skippy is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 12-12-2013 , 01:41   Re: Perfect Hemisphere with TE_SetupBeamRingPoint
Reply With Quote #6

Thats not how it works. Make a series of lines instead
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
GsiX
gee, six eggs
Join Date: Aug 2012
Location: Land Below The Wind
Old 12-12-2013 , 04:58   Re: Perfect Hemisphere with TE_SetupBeamRingPoint
Reply With Quote #7

Man, may you post some code for me to practice please?
Edit: a moving ring up and down maybe?
__________________
If i happen to insulted you unintentionally,
it was me and Google Translate who did it.

Last edited by GsiX; 12-12-2013 at 04:59.
GsiX is offline
Skippy
Senior Member
Join Date: Nov 2011
Old 12-12-2013 , 08:45   Re: Perfect Hemisphere with TE_SetupBeamRingPoint
Reply With Quote #8

PHP Code:
#include <sourcemod>
#include <sdktools>

new g_BeamSprite
new g_HaloSprite

new bool:Beam[MAXPLAYERS+1] = false;
new 
Float:coord[3];
new 
Float:beacoord[3];
new 
Float:radius[MAXPLAYERS+1];
new 
Float:radius2[MAXPLAYERS+1];
new 
bool:ReachedVertical[MAXPLAYERS+1] = false;
new 
bool:ReachedRadius0[MAXPLAYERS+1] = false;

new 
g_Serial_Gen 0;
new 
g_BeaconSerial[MAXPLAYERS+1] = { 0, ... };
// Basic color arrays for temp entities
new redColor[4]        = {2557575255};
new 
greenColor[4]    = {7525575255};
new 
blueColor[4]    = {7575255255};
new 
greyColor[4]    = {128128128255};

public 
Plugin:myinfo 
{
    
name "Moving Beam Ring",
    
author "Skipper",
    
description "Moving Beam Ring Test",
    
version "1.0.0",
}

public 
OnPluginStart() 
{    
    
RegAdminCmd("sm_beamme"Command_BeammeADMFLAG_BAN"Beam ring around client");
    
g_BeamSprite PrecacheModel("materials/sprites/laserbeam.vmt"); 
    
g_HaloSprite PrecacheModel("materials/sprites/glow01.vmt");
}

public 
Action:Command_Beamme(clientargs
{    
    if(
IsClientInGame(client))
    {
        if(
Beam[client] == false)
        {
            
Beam[client] = true;
            
GetClientAbsOrigin(clientcoord);
            
radius[client] = 600.0;
            
beacoord[0] = coord[0];
            
beacoord[1] = coord[1];
            
beacoord[2] = coord[2];
            
CreateBeacon(client);
        }
        else
        {
            
Beam[client] = false;
            
KillBeacon(client);
            
ReachedVertical[client] = false;
            
ReachedRadius0[client] = false;
        }        
    }
    return 
Plugin_Handled;
}

CreateBeacon(client)
{
    
g_BeaconSerial[client] = ++g_Serial_Gen;
    
CreateTimer(0.15Timer_Beaconclient | (g_Serial_Gen << 7), TIMER_REPEAT TIMER_FLAG_NO_MAPCHANGE);    
}

KillBeacon(client)
{
    
g_BeaconSerial[client] = 0;

    if (
IsClientInGame(client))
    {
        
SetEntityRenderColor(client255255255255);
    }
}

/*public Action:Timer_Beacon(Handle:timer, any:value)
{
    new client = value & 0x7f;
    new serial = value >> 7;
 
    if (!IsClientInGame(client)
        || !IsPlayerAlive(client)
        || g_BeaconSerial[client] != serial)
    {
        KillBeacon(client);
        return Plugin_Stop;
    }
        
    new Float:coordin[3];
    coordin[2] = (coord[2] + MaximumHeight);
    
    new team = GetClientTeam(client);
    
    //Change Vertical
    if(beacoord[2] >= coordin[2]) // we've gone beyond the highest point
    {
        //implies coordin[2] is the maximum height
        ReachedVertical[client] = true;
    }
    if(beacoord[2] <= coord[2]) //we've gone below the lowest point
    {
        ReachedVertical[client] = false;
    }
    if(ReachedVertical[client] == false) // we're going up
    {
        beacoord[2] += 3.0;
    }    
    if(ReachedVertical[client] == true) // we're going down.
    {
        beacoord[2] -= 3.0;
    }
    
    //Change radius
    if(radius[client] >= MaximumRadius) // we've gone beyond radius of the hemisphere
    {
        ReachedRadius0[client] = false;
    }
    if(radius[client] <= 0.0) // we've gone below the radius of the hemisphere
    {
        ReachedRadius0[client] = true;
    }
    if(ReachedRadius0[client] == false) // the ring is getting smaller
    {
        radius[client] -= 3.0;
    }    
    if(ReachedRadius0[client] == true) // the ring is getting bigger
    {
        radius[client] += 3.0;
    }
 
    radius2[client] = (radius[client] + 1.0);
    
    TE_SetupBeamRingPoint(beacoord, radius[client], radius2[client], g_BeamSprite, g_HaloSprite, 0, 15, 1.0, 0.01, 0.0, greyColor, 10, 0);
    TE_SendToAll();
    
    if (team == 2)
    {
        TE_SetupBeamRingPoint(beacoord, radius[client], radius2[client], g_BeamSprite, g_HaloSprite, 0, 10, 1.0, 10.0, 0.5, redColor, 10, 0);
    }
    else if (team == 3)
    {
        TE_SetupBeamRingPoint(beacoord, radius[client], radius2[client], g_BeamSprite, g_HaloSprite, 0, 10, 0.1, 2.0, 0.0, blueColor, 10, 0);
    }
    else
    {
        TE_SetupBeamRingPoint(beacoord, radius[client], radius2[client], g_BeamSprite, g_HaloSprite, 0, 10, 1.0, 10.0, 0.5, greenColor, 10, 0);
    }
    
    TE_SendToAll();
 
        
    return Plugin_Continue;
}*/ 
__________________
Plugins:
[Any] Aim Menu

Want a TF2 plugin? Feel free to pm me to discuss it.
Skippy is offline
GsiX
gee, six eggs
Join Date: Aug 2012
Location: Land Below The Wind
Old 12-12-2013 , 08:48   Re: Perfect Hemisphere with TE_SetupBeamRingPoint
Reply With Quote #9

Thanks.. gonna try this out right away.

EDIT: I dont see how the beam move up and down. I m not judging since my math is super bad and poorest, but i think this calculation is wrong.
__________________
If i happen to insulted you unintentionally,
it was me and Google Translate who did it.

Last edited by GsiX; 12-12-2013 at 08:54.
GsiX is offline
GsiX
gee, six eggs
Join Date: Aug 2012
Location: Land Below The Wind
Old 12-12-2013 , 11:17   Re: Perfect Hemisphere with TE_SetupBeamRingPoint
Reply With Quote #10

Skippy, is it should look like this? Again, my math is very bad. i get a perfect curve instead of hemisphere.

[IMG]http://s23.************/x8ul48ut7/image.png[/IMG]

EDIT: wow.. sorry for the double post..


EDIT2: Ok i m done headect.. someone please fix this..
Spoiler

[IMG]http://s28.************/6sp225laj/image.png[/IMG]
__________________
If i happen to insulted you unintentionally,
it was me and Google Translate who did it.

Last edited by GsiX; 12-12-2013 at 12:55.
GsiX 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 20:35.


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