PDA

View Full Version : SDK-tools-temp-entity questions ?


Peoples Army
08-08-2007, 20:24
Im workin on the plugin "Death Beams" , i have just about everything , but i need a few things i cant find about temp ents here .

1. what is the Model Index , and halo index i should use ?
2. what is "a" in the color array?
3. what is the speed i should use ?



/*
Death Beam's
Displays A Beam Between The Victum And Killer.

*/
#include <sourcemod>

#define VERSION "0.1"

new Handle:Switch;
new Float:VictimOrigin[3];
new Float:AttackerOrigin[3];
new Float:Color[4];

public Plugin:myinfo =
{
name = "Death Beam",
author = "Peoples Army",
description = "Creates A Beam Between Victum And Killer",
version = VERSION,
url = "www.sourcemod.net (http://www.sourcemod.net)"
}

public OnPluginStart()
{
Switch = CreateConVar("death_beam_on","1","1 turns the plugin on 0 is off",FCVAR_NOTIFY);
Color[0] = CreateConVar("death_beam_red","255","Amount OF Red In The Beam",FCVAR_NOTIFY);
Color[1] = CreateConVar("death_beam_green","255","Amount Of Green In The Beam",FCVAR_NOTIFY);
Color[2] = CreateConVar("death_beam_blue","255","Amount OF Blue In The Beam",FCVAR_NOTIFY);
HookEvent("player_death",DeathEvent);
}

public DeathEvent(Handle:event,const String:name[],bool:dontBroadcast)
{
new victimId = GetEventInt(event, "userid");
new attackerId = GetEventInt(event, "attacker");

new victim = GetClientOfUserId(victimId);
new attacker = GetClientOfUserId(attackerId);

GetClientAbsOrigin(victim,VictimOrigin);
GetClientAbsOrigin(attacker,AttackerOrigin);

if(GetConVarInt(Switch))
{
TE_SetupBeamPoints(VictimOrigin,AttackerOrigi n,model,halo,0,0,50.0,10,10,20,10,color,0);
}
}

bl4nk
08-08-2007, 20:53
I don't know if this will work right, seeing as how every person is going to see this beam. Also, you shouldn't draw it straight from the attacker to the victim. Get the attacker's eye level and set that as the starting point. See http://wiki.alliedmods.net/SDKTools_%28SourceMod_Development%29#GetEyePo sition_Example for info on how to do that.

Peoples Army
08-08-2007, 20:56
that didnt answer any of my questions .

bl4nk
08-08-2007, 20:57
I know, I was just giving you some tips and such.

pRED*
08-08-2007, 20:59
You need to precache a model and get the return value. Use that for model index.
Use NULL (or maybe 0 if that doesn't work for halo model)

"sprites/lgtning.vmt"
"sprites/steam1.vmt"
"sprites/blueglow1.vmt"
"sprites/crystal_beam1.vmt"

would be some good models to play around with

Peoples Army
08-08-2007, 21:00
LOL. thanks :up:

still need to know those 3 questions if any one has any ideas .

pRED*
08-08-2007, 21:02
a is alpha. 255 - full visible, 0 - invisible. Take your pick..

And just play around with the speed.

http://www.mani-admin-plugin.com/mani_admin_plugin/documentation/index.php

Click effects, individual effects, beam points. To see some examples numbers and a picture of what they look like

Peoples Army
08-08-2007, 21:18
is it still ?
public plugin_precache()
{
precache_model()
}

EvgenKo423
04-03-2013, 04:41
Hi there!
I have a little problem using TE_SetupBeamPoints. It just ignores the blue color value, as if it's set to 0. :? Does anybody know how to fix this issue?

EDIT: Sorry guys... Actually it works fine.:mrgreen: I have found an error, it was my fault... :oops: :evil:

Bimbo1
04-03-2013, 05:45
weird. that always worked for me. try using a sprite that has the blue color in it, like a white one. i am mot sure if a red one can turn into blue.

11530
04-03-2013, 12:35
Hi there!
I have a little problem using TE_SetupBeamPoints. It just ignores the blue color value, as if it's set to 0. :? Does anybody know how to fix this issue?

Do not resurrect a six year old thread, EvgenKo423. Make your own one.

Anyway, this was long ago now, but I noticed similarly that black (0, 0, 0, 255) would be transparent. The darker it was, the more transparent it became. Never found a solution except to avoid the darkest palettes.

I'd point out, however, that blue works fine.

EvgenKo423
04-04-2013, 08:45
Do not resurrect a six year old thread
Thanks for an answer, but I don't think, that making hundred similar threads is better then necroposting...

11530
04-04-2013, 10:54
Thanks for an answer, but I don't think, that making hundred similar threads is better then necroposting...

Actually yes, it is usually better to make a new thread. Also taking into account the fact that the OP's problem has nothing to do with your problem except you both use the TE_SetupBeamPoints function. Now the only way you might get an answer is if people click "SDK-tools-temp-entity questions ?" and not something more specific to your problem such as "SDKTools: TE_SetupBeamPoints Colors".