Hey i got a quick question,
how do i split an vector to
x = blabla
y = blabla
z = blabla
I want to split this vector :
local pos = v:GetPos()
so i can add some to Z
string.Split
or
string.Explode maybe but i dont get it :>
Wrong forum but.
local pos = v:GetPos()
local x = pos.x
local y = pos.y
local z = pos.z
z = z + 100
pos.z = z
v:SetPos(pos)
Thank you, and sorry for wrong forum :o
// Edit :
Got one last question how do i check that eyeTrace is an ragdoll?
EyeTrace.Entity:GetClass() == "prop_ragdoll"
vector is struct
string is an array
[QUOTE=Fourier;48408510]vector is struct
string is an array[/QUOTE]
This is Lua, so I doubt it's that simple here.
Strings are [I]string[/I]s, but vectors are either [I]userdata[/I] or [I]table[/I]s depending on the surrounding implementation.
[QUOTE=Tamschi;48410621]This is Lua, so I doubt it's that simple here.
Strings are [I]string[/I]s, but vectors are either [I]userdata[/I] or [I]table[/I]s depending on the surrounding implementation.[/QUOTE]
It's parsed through a struct in C++ where the Vector method is implemented.
[QUOTE=code_gs;48411157]It's parsed through a struct in C++ where the Vector method is implemented.[/QUOTE]
So [I]userdata[/I] then.
Sorry, you need to Log In to post a reply to this thread.