Glider⠠⠵
Global Moderator
Sr. Member
    
Posts: 413
⠠⠵
|
 |
« 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 #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
|
 |
« 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
⠠⠵
|
 |
« 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
|
 |
« 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
|
 |
« Reply #4 on: March 25, 2011, 01:43:04 PM » |
|
sry late : you could use env_SmokeStack and parent it so a player : example: 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
|
 |
« 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
⠠⠵
|
 |
« 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
|
 |
« 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
|
 |
« 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
|
 |
« Reply #9 on: December 08, 2011, 11:51:43 PM » |
|
you get pretty bad jitter
|
|
|
|
|
Logged
|
 DarkEnergy
|
|
|
|
Vulpone
|
 |
« 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
|
 |
« Reply #11 on: December 09, 2011, 01:01:24 AM » |
|
looooool
|
|
|
|
|
Logged
|
 DarkEnergy
|
|
|
|
-El Diablo
|
 |
« 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
|
 |
« 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
|
|
|
|