PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Unlock Gun Problem *Gelöst*



Blackfinal
04.12.2005, 10:18
Und zwar will ich das man mit der Gun auch prop_dynamic öffnen kann sprich die Combine Türen


function onSecondaryAttack( )
local vPos = _PlayerGetShootPos( Owner );
local vAng = _PlayerGetShootAng( Owner );

_TraceLine( vPos, vAng, 110, Owner );


if ( _TraceHit() == false ) then
return "";
end


if (_TraceHitWorld() ) then
return "";
end


local tr = _TraceGetEnt();

if ( _EntGetType( tr ) == "prop_dynamic") then

_EntFire( tr, "setanimation open", "", 0 )
end
end

Price
04.12.2005, 12:01
bin mir nicht 100% sicher aber probiere mal (ist der name der türen tr ??):

function onSecondaryAttack( )
local vPos = _PlayerGetShootPos( Owner );
local vAng = _PlayerGetShootAng( Owner );

_TraceLine( vPos, vAng, 110, Owner );


if ( _TraceHit() == false ) then
return "";
end


if (_TraceHitWorld() ) then
return "";
end


local tr = _TraceGetEnt();

if ( _EntGetType( tr ) == "prop_dynamic") then

_EntFire( tr,"setanimation",open,0);
end
end
müsste gehen wenn nicht dann vielleicht noch

function onSecondaryAttack( )
local vPos = _PlayerGetShootPos( Owner );
local vAng = _PlayerGetShootAng( Owner );
local tr =_EntitiesFindByName("tr");

_TraceLine( vPos, vAng, 110, Owner );


if ( _TraceHit() == false ) then
return "";
end


if (_TraceHitWorld() ) then
return "";
end


local tr = _TraceGetEnt();

if ( _EntGetType( tr ) == "prop_dynamic") then

_EntFire(tr[tr],"setanimation",open,0);
end
end

Blackfinal
04.12.2005, 12:13
Nein das tr steht für _TraceGetEnt();

Und nein der Script funktioniert leider nicht

Also bei den anderen Türen isses ja einfach weil es func_door ist da macht man dann halt _EntFire unlock...

Nur bei den Türen der Combine ist es anderster es sind prop_dynanic und man muss dort ne "animation" machen ingame sieht es dann so aus
ent_fire !picker setanimation open

Und nun möchte ich dies un Lua umsetzten!



EDIT: NUN ich habe was in dem Code geänder und zwar hast du die lerzeichen nach dem comma vergessen die habe ich noch hingemacht nun schreibt er mir ingame



Dynamic prop prop_dynamic: no sequence named:

Price
04.12.2005, 14:17
ja natürlich gehts net, ich hab total verplant.
Ich gucks mir nochma an :)
omg ich depp...steht doch da :roll:
local tr....

Blackfinal
04.12.2005, 14:38
Problem GELÖST!!!!

Ich bin sowas von dumm :roll:

ich musste nur etwas in Klammern setzten und schon hat es funktioniert!

Aber Trotzdem Danke für deine Hilfe!

Price
04.12.2005, 15:43
so wie vorschlag eins ?
oder wie :D

Blackfinal
04.12.2005, 15:44
du hast geschrieben
if ( _EntGetType( tr ) == "prop_dynamic") then

_EntFire( tr,"setanimation",open,0);
end
end

und ich habe dies geändert


if ( _EntGetType( tr ) == "prop_dynamic") then

_EntFire( tr, "setanimation", "open", 0);
end
end

Price
04.12.2005, 16:34
ah siehst hatte ich selber die " vergessen :lol:
Abert geht ja jetzt :o