
I'm currently working on a new race but I have a problem..
The Ability creates a "wall"(just some prop_physics with Render mode RENDER_NONE + some sort of a huge beam oô)
As you can see it is working:
But if we turn 90° around we get this result:
It also works but it dosen't faces the caster
Here's the snipped
Code:
stock W3_Condense(client,skill,team){
new Float:fClientAimPos1[3];
new Float:fClientAimPos2[3];
new Float:fClientEyeAngle[3] = {0.0,0.0,0.0};
War3_GetAimEndPoint(client, fClientAimPos1);
fClientAimPos2[0]=fClientAimPos1[0],fClientAimPos2[1]=fClientAimPos1[1],fClientAimPos2[2]=fClientAimPos1[2];
new Float:duration = CondenseDuration[skill]; //max duration!
new ent = SpawnFrozenProp(fClientAimPos1,fClientEyeAngle,CONDENSE_MDL1,CONDENSE_STRENGTH,team,duration,true);
EmitSoundToAll(crystallize, ent, SNDCHAN_AUTO, SNDLEVEL_NORMAL, SND_NOFLAGS, SNDVOL_NORMAL, SNDPITCH_NORMAL, -1, fClientAimPos1, NULL_VECTOR, true, 0.0);
new ax = 1;
for(new i = 1; i <= skill; i++){
new randomizer = GetRandomInt(80,110);
fClientAimPos1[ax]+=randomizer;
fClientAimPos2[ax]-=randomizer;
SpawnFrozenProp(fClientAimPos1,fClientEyeAngle,CONDENSE_MDL1,CONDENSE_STRENGTH,team,duration,true);
SpawnFrozenProp(fClientAimPos2,fClientEyeAngle,CONDENSE_MDL1,CONDENSE_STRENGTH,team,duration,true);
}
fClientAimPos1[2]+=35;
fClientAimPos2[2]+=35;
fClientAimPos1[ax]+=40; //fit prop width
fClientAimPos2[ax]+=40;
new beam_ent = CreateEntityByName("env_beam");
if (beam_ent > 0 && IsValidEdict(beam_ent))
{
decl String:beamname[16];
Format(beamname, sizeof(beamname), "w3s_beam_%d", client);
DispatchKeyValueVector(beam_ent, "origin", fClientAimPos1);
SetEntPropVector(beam_ent, Prop_Send, "m_vecEndPos", fClientAimPos2);
SetEntityModel(beam_ent, LASER_SPRITE);
SetEntPropFloat(beam_ent, Prop_Send, "m_fWidth", 100.0);
SetEntPropFloat(beam_ent, Prop_Send, "m_fEndWidth", 100.0);
DispatchKeyValue(beam_ent, "texture", LASER_SPRITE);
DispatchKeyValue(beam_ent, "targetname", beamname);
DispatchKeyValue(beam_ent, "LightningStart", beamname);
DispatchKeyValue(beam_ent, "TouchType", "0");
DispatchKeyValue(beam_ent, "BoltWidth", "12.0");
DispatchKeyValue(beam_ent, "life", "0");
DispatchKeyValue(beam_ent, "rendercolor", "0 0 0");
DispatchKeyValue(beam_ent, "renderamt", "0");
DispatchKeyValue(beam_ent, "HDRColorScale", "1.0");
DispatchKeyValue(beam_ent, "decalname", "Bigshot");
DispatchKeyValue(beam_ent, "StrikeTime", "0");
DispatchKeyValue(beam_ent, "TextureScroll", "35");
SetEntityRenderMode(beam_ent, RENDER_TRANSCOLOR);
SetEntityRenderColor(beam_ent, 100, 100, 255);
SetEntityRenderFx(beam_ent,RENDERFX_NO_DISSIPATION);
AcceptEntityInput(beam_ent, "TurnOn");
CreateTimer(duration, Timer_RemoveEntity, beam_ent);
}
}
Hope someone can help me :/new Float:fClientAimPos1[3];
new Float:fClientAimPos2[3];
new Float:fClientEyeAngle[3] = {0.0,0.0,0.0};
War3_GetAimEndPoint(client, fClientAimPos1);
fClientAimPos2[0]=fClientAimPos1[0],fClientAimPos2[1]=fClientAimPos1[1],fClientAimPos2[2]=fClientAimPos1[2];
new Float:duration = CondenseDuration[skill]; //max duration!
new ent = SpawnFrozenProp(fClientAimPos1,fClientEyeAngle,CONDENSE_MDL1,CONDENSE_STRENGTH,team,duration,true);
EmitSoundToAll(crystallize, ent, SNDCHAN_AUTO, SNDLEVEL_NORMAL, SND_NOFLAGS, SNDVOL_NORMAL, SNDPITCH_NORMAL, -1, fClientAimPos1, NULL_VECTOR, true, 0.0);
new ax = 1;
for(new i = 1; i <= skill; i++){
new randomizer = GetRandomInt(80,110);
fClientAimPos1[ax]+=randomizer;
fClientAimPos2[ax]-=randomizer;
SpawnFrozenProp(fClientAimPos1,fClientEyeAngle,CONDENSE_MDL1,CONDENSE_STRENGTH,team,duration,true);
SpawnFrozenProp(fClientAimPos2,fClientEyeAngle,CONDENSE_MDL1,CONDENSE_STRENGTH,team,duration,true);
}
fClientAimPos1[2]+=35;
fClientAimPos2[2]+=35;
fClientAimPos1[ax]+=40; //fit prop width
fClientAimPos2[ax]+=40;
new beam_ent = CreateEntityByName("env_beam");
if (beam_ent > 0 && IsValidEdict(beam_ent))
{
decl String:beamname[16];
Format(beamname, sizeof(beamname), "w3s_beam_%d", client);
DispatchKeyValueVector(beam_ent, "origin", fClientAimPos1);
SetEntPropVector(beam_ent, Prop_Send, "m_vecEndPos", fClientAimPos2);
SetEntityModel(beam_ent, LASER_SPRITE);
SetEntPropFloat(beam_ent, Prop_Send, "m_fWidth", 100.0);
SetEntPropFloat(beam_ent, Prop_Send, "m_fEndWidth", 100.0);
DispatchKeyValue(beam_ent, "texture", LASER_SPRITE);
DispatchKeyValue(beam_ent, "targetname", beamname);
DispatchKeyValue(beam_ent, "LightningStart", beamname);
DispatchKeyValue(beam_ent, "TouchType", "0");
DispatchKeyValue(beam_ent, "BoltWidth", "12.0");
DispatchKeyValue(beam_ent, "life", "0");
DispatchKeyValue(beam_ent, "rendercolor", "0 0 0");
DispatchKeyValue(beam_ent, "renderamt", "0");
DispatchKeyValue(beam_ent, "HDRColorScale", "1.0");
DispatchKeyValue(beam_ent, "decalname", "Bigshot");
DispatchKeyValue(beam_ent, "StrikeTime", "0");
DispatchKeyValue(beam_ent, "TextureScroll", "35");
SetEntityRenderMode(beam_ent, RENDER_TRANSCOLOR);
SetEntityRenderColor(beam_ent, 100, 100, 255);
SetEntityRenderFx(beam_ent,RENDERFX_NO_DISSIPATION);
AcceptEntityInput(beam_ent, "TurnOn");
CreateTimer(duration, Timer_RemoveEntity, beam_ent);
}
}





Logged

