Amadeu5 said:Am I missing something?
Amadeu5 said:Got it...
There seems to be some problems here though... I extracted the vengeance dir in the zip to Tribes\Gamedata and launched Tribes with the following command, without any modifications to the files:
Tribes2.exe -nologin -mod vengeance
Everything seems to be fine, but when I fire the hook, the whole screen turns skybox-white (HUDs staying where they should be) and the whole thing crashes. Last time it muted my speakers and seemed to have deleted my cookies because I had to log in to TW.
Am I missing something?
FishStix said:how do i instal the client
function Player::grappleObject(%obj)
{
if(isObject(%obj))
{
if(isEventPending(%obj.grappleSchedule))
cancel(%obj.grappleSchedule);
if(%obj.getState() !$= "Dead")
{
%obj.grapplePos = %p.getTargetPoint();
%dist = vectorDist(%obj.grapplePos , %obj.getPosition());
%rad = (1 / getWord(%dist, 0)) SPC (1 / getWord(%dist, 1)) SPC (1 / getWord(%dist, 2));
%vel = %obj.getVelocity();
%mass = %obj.getDatablock().mass;
%pos = posFromTransform(%obj.getTransform());
%force = VectorScale(%rad, %mass * %vel * %vel);
%obj.applyImpulse(%pos, %force);
%obj.grappleSchedule = %obj.schedule(250, "grappleObject");
}
}
}
Looks like I forgot to copy the line that defines that... no matter, just tried it with it, doesn't work. I'm now trying to make some needed variables global and using those instead of redefining them, might work better (although I doubt it).Plasmatic said:%p = ?
if(%obj.getState() !$= "Dead")
{
%dist = (1 / getWord($rad, 0)) SPC (1 / getWord($rad, 1)) SPC (1 / getWord($rad, 2));
%vel = %obj.getVelocity();
%mass = %obj.getDatablock().mass;
%pos = posFromTransform(%obj.getTransform());
%force = VectorScale(%dist, %mass * %vel * %vel);
%obj.applyImpulse(%pos, %force);
%obj.grappleSchedule = %obj.schedule(250, "grappleObject");
}
Amadeu5 said:Code:if(%obj.getState() !$= "Dead")
KillerONE said:I have no idea when it comes to coding.. but is that $ supposed to be there?
KillerONE said:I suppose there is no debug console in T2?
Like you could plug in line by line, or check values via console without running the whole script? Like a line by line thing.. Wish I could help!! Sorry!
Amadeu5 said:Argh. The script seems to be fine (I executed it in the console and it didn't give any error messages), but when I press fire, it freezes. Tried starting a game and exiting, deleting .dso's and starting again, to no avail. The funny thing is that I only used existing lines from other functions/scripts with some minor modifications.
Anyway, what I'm doing is:
Code:function Player::grappleObject(%obj) { if(isObject(%obj)) { if(isEventPending(%obj.grappleSchedule)) cancel(%obj.grappleSchedule); if(%obj.getState() !$= "Dead") { %obj.grapplePos = %p.getTargetPoint(); %dist = vectorDist(%obj.grapplePos , %obj.getPosition()); %rad = (1 / getWord(%dist, 0)) SPC (1 / getWord(%dist, 1)) SPC (1 / getWord(%dist, 2)); %vel = %obj.getVelocity(); %mass = %obj.getDatablock().mass; %pos = posFromTransform(%obj.getTransform()); %force = VectorScale(%rad, %mass * %vel * %vel); %obj.applyImpulse(%pos, %force); %obj.grappleSchedule = %obj.schedule(250, "grappleObject"); } } }
Basically it's real life physics, as in the centripetal force is equal to m*v^2/r. Continuously applying this force to the player should keep it at a circular path around the grapple point. For the reelIn function the same thing can be used with only adding $TractorPower to %force. If anyone (especially you, ZOD) can make this not freeze immediately and tell me how it works, it'd be great...