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, 11:19:56 AM *
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: Need help with some math  (Read 363 times)
Revan
Sr. Member
****
Posts: 274



View Profile
« on: October 10, 2011, 09:12:57 AM »

Hello Cheesy
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 :/
« Last Edit: October 10, 2011, 09:22:54 AM by Revan » Logged

#war3source
qwerty
Jr. Member
**
Posts: 87


View Profile
« Reply #1 on: October 10, 2011, 10:32:16 AM »

off topic, but is this anivia from LoL?

Logged
Revan
Sr. Member
****
Posts: 274



View Profile
« Reply #2 on: October 10, 2011, 10:35:19 AM »

Yes   Cheesy
finaly someone made a lol race heh? Tongue
Logged

#war3source
qwerty
Jr. Member
**
Posts: 87


View Profile
« Reply #3 on: October 10, 2011, 11:21:12 AM »

Yes   Cheesy
finaly someone made a lol race heh? Tongue

yes.
Logged
Revan
Sr. Member
****
Posts: 274



View Profile
« Reply #4 on: October 11, 2011, 07:01:46 AM »

problem solved.. race will be released soon  Wink
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!