Archived copy of war3source.com, the War3Source forum (2009–2020), rebuilt from the Internet Archive by wc3mods.net. This page was captured on 2012-10-24 (original capture). Forum · All archived topics · Wiki · Bug tracker · Blog
Chat

War3:Source
October 24, 2012, 03:23:47 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Download: http://war3source.com/index.php?board=9.0
What is War3Source?: http://war3source.com/index.php?topic=200.0
Sample Stats: http://war3source.com/war3stats
Steam Community Group: http://steamcommunity.com/groups/war3source
War3Source SVN Checkout: http://ownageclan.com/svn/war3source/
War3Source servers: http://www.game-monitor.com/search.php?vars=war3_version=
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Attach rings to player?  (Read 712 times)
Glider⠠⠵
Global Moderator
Sr. Member
*****
Posts: 413


⠠⠵


View Profile
« on: November 14, 2010, 09:59:15 AM »

Does anybody have an idea for a nice ring like effect? I wanted to use the TE BeamRingPoint with SDKHooks but the fucking thing can't have a lifetime below 0.1 so I still can't do a fluent ring that just follows a player :/

Here's my test code

Code:
#pragma semicolon 1
#include "W3SIncs/War3Source_Interface"
#include <sdkhooks>


new thisRaceID;

public OnWar3PluginReady(){
    thisRaceID=War3_CreateNewRace("Developer","develop");
    War3_CreateRaceEnd(thisRaceID); ///DO NOT FORGET THE END!!!
}

// Effects
new BeamSprite,HaloSprite;

public OnMapStart()
{
BeamSprite=PrecacheModel("materials/sprites/lgtning.vmt");
HaloSprite=PrecacheModel("materials/sprites/halo01.vmt");
}

public OnWar3EventSpawn(client)
{
SDKHook(client, SDKHook_PostThink, Effekt);
}

public OnWar3EventDeath(victim,attacker)
{
SDKUnhook(victim, SDKHook_PostThink, Effekt);
}

public Effekt(client)
{
new Float:effect_vec[3];
GetClientAbsOrigin(client,effect_vec);
effect_vec[2]+=15.0;
// stock TE_SetupBeamRingPoint(const Float:center[3], Float:Start_Radius, Float:End_Radius, ModelIndex, HaloIndex, StartFrame,
    //FrameRate, Float:Life, Float:Width, Float:Amplitude, const Color[4], Speed, Flags)
TE_SetupBeamRingPoint(effect_vec,45.0,44.0,BeamSprite,HaloSprite,0,300,0.1,5.0,0.0,{0,255,0,255},10,0);
TE_SendToAll();
}

It's fucking pissing me off since I just wrote a 600 line race and the only thing missing is a effect :|
« Last Edit: November 14, 2010, 10:02:17 AM by Foolishfox » Logged

[Oddity]TeacherCreature
Sr. Member
****
Posts: 463


View Profile
« Reply #1 on: November 14, 2010, 12:08:56 PM »

just do a 0.1 effect and loop it every 0.1 seconds?
Logged

Glider⠠⠵
Global Moderator
Sr. Member
*****
Posts: 413


⠠⠵


View Profile
« Reply #2 on: November 14, 2010, 12:26:20 PM »

Looks like shit as it "follows" the player with a short delay. If you walk backwards the ring is always in front of you and it's just messy messy messy. I don't want to make a custom particle and force players to download that, but I'm really out of ideas what I could do right now. It bugs the shit outta me that you can't parent this thing :X
Logged

Ownz
Developer
Administrator
Hero Member
*****
Posts: 2045



View Profile WWW Email
« Reply #3 on: November 14, 2010, 05:14:47 PM »

nope u cant really make a ring follow a person. its unfortunate the engine doesn't do well with effects
Logged

DarkEnergy
Revan
Sr. Member
****
Posts: 275



View Profile
« Reply #4 on: March 25, 2011, 01:43:04 PM »

sry late :

you could use env_SmokeStack and parent it so a player :
example:
Code:
public Action:AttachBeam(const client{
new particle = CreateEntityByName("env_smokestack");
if(IsValidEdict(particle) && IsClientInGame(client))
{
decl String:Name[32], Float:fPos[3];
Format(Name, sizeof(Name), "RingAttach-%i", client);
GetEntPropVector(client, Prop_Send, "m_vecOrigin", fPos);
fPos[2] += 28.0;
new Float:fAng[3] = {0.0, 0.0, 0.0};

// Set Key Values
DispatchKeyValueVector(particle, "Origin", fPos);
DispatchKeyValueVector(particle, "Angles", fAng);
DispatchKeyValueFloat(particle, "BaseSpread", 58.0);
DispatchKeyValueFloat(particle, "StartSize", 40.0);
DispatchKeyValueFloat(particle, "EndSize", 20.0);
DispatchKeyValueFloat(particle, "Twist", 20.0);

DispatchKeyValue(particle, "Name", Name);
DispatchKeyValue(particle, "SmokeMaterial", "particle/fire.vmt");
DispatchKeyValue(particle, "RenderColor", "100 100 220");
DispatchKeyValue(particle, "SpreadSpeed", "10");
DispatchKeyValue(particle, "RenderAmt", "200");
DispatchKeyValue(particle, "JetLength", "10");
DispatchKeyValue(particle, "RenderMode", "0");
DispatchKeyValue(particle, "Initial", "0");
DispatchKeyValue(particle, "Speed", "100");
DispatchKeyValue(particle, "Rate", "2500");
DispatchSpawn(particle);

// Set Entity Inputs
SetVariantString("!activator");
AcceptEntityInput(particle, "SetParent", client, particle, 0);
AcceptEntityInput(particle, "TurnOn");
CreateTimer(15.0, RemoveParticle, particle);
}
else
{
LogError("Failed to create env_smokestack!");
}
}

public Action:RemoveParticle(Handle:timer, any:particle)
{
if(IsValidEdict(particle)
{
AcceptEntityInput(particle, "Kill");
}
}
Logged

#war3source
qwerty
Jr. Member
**
Posts: 87


View Profile
« Reply #5 on: March 25, 2011, 11:42:35 PM »

well, the pain in the ass, non-elegant solution?

make  custom weapon replacing knife for that race.  same stats, but have a dif. w_model, with the ring on it.

not a perfect sol'n, but...yeah
Logged
Glider⠠⠵
Global Moderator
Sr. Member
*****
Posts: 413


⠠⠵


View Profile
« Reply #6 on: March 26, 2011, 07:04:15 AM »

well, the pain in the ass, non-elegant solution?

make  custom weapon replacing knife for that race.  same stats, but have a dif. w_model, with the ring on it.

not a perfect sol'n, but...yeah

Yeah, because replacing w_models with sourcemod works so well. I code most of my races to work for TF2 and CS:S, so this would be a terrible solution.

I like the env_smokestack idea, that's pretty clever. Might look into that sometime.

Also the original method I proposed is really only shitty if you focus on how it looks when you're alone. In a proper game it looks okay and is a very nice way to alert people of what aura somebody has.
« Last Edit: March 26, 2011, 07:06:15 AM by TedTheodoreLogan » Logged

Revan
Sr. Member
****
Posts: 275



View Profile
« Reply #7 on: March 26, 2011, 10:18:33 AM »

yes, the aura effect is a pretty awesome idea. btw you need to be carefully when parenting env_smokestack to a player, the angles of the entity are also parented
Logged

#war3source
bigdane
Newbie
*
Posts: 1



View Profile WWW Email
« Reply #8 on: December 08, 2011, 11:49:44 PM »

just do a 0.1 effect and loop it every 0.1 seconds?
Logged

Ownz
Developer
Administrator
Hero Member
*****
Posts: 2045



View Profile WWW Email
« Reply #9 on: December 08, 2011, 11:51:43 PM »

you get pretty bad jitter
Logged

DarkEnergy
Vulpone
Full Member
***
Posts: 140



View Profile Email
« Reply #10 on: December 09, 2011, 01:00:25 AM »

you get pretty bad jitter

You realize he is a spam bot, right?
They copy the exact post someone else says and then post it.

Look at their signature.
Logged

Sapere aude!
Ownz
Developer
Administrator
Hero Member
*****
Posts: 2045



View Profile WWW Email
« Reply #11 on: December 09, 2011, 01:01:24 AM »

looooool
Logged

DarkEnergy
-El Diablo
Global Moderator
Full Member
*****
Posts: 205


View Profile
« Reply #12 on: February 16, 2012, 06:51:40 AM »

nope u cant really make a ring follow a person. its unfortunate the engine doesn't do well with effects

Can you make something follow a player on the ground?  Or even create a animation with the engine?
Logged
Revan
Sr. Member
****
Posts: 275



View Profile
« Reply #13 on: February 16, 2012, 07:00:53 AM »

can you be more specific? what do you mean with "something"(effect/prop....?)
you can also "force" a player to replay a animation by using some sort of a tempent but if you want to do this with entities you probably need to use CEntity or get some SigScanning skills
« Last Edit: February 16, 2012, 07:02:41 AM by Revan » Logged

#war3source
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!