[T2] Vengeance mod

Press fire, calls ::eek:nFire and in turn calls ::grappleObject. Release fire trigger calls ::eek:nReelIn and in turn calls ::reelIn. Press fire again and ::deconstruct is called.

GrappleObject keeps you stead, reelIn sets movment twords target.
 
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. :huh:

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. :huh:

Am I missing something?
:huh:
 
FishStix said:
how do i instal the client :mad:

The file is a VL2, which can be recognized as a zip file. Which means that when you 'save' the file, if the bottom drop down says 'winzip' file, it will save the vl2 with a zip extension. That is whatever.vl2.zip which wont work. Either change the bottom drop down on the save dialog to all files or rename the file after the fact from whatever.vl2.zip to whatever.vl2 .

This is a common reason for T2's failure to recognize newly installed vl2's. BTW, you may need to change folder options to display common extensions so you can see this stuff. Otherwise, this can appear to be a problem without a cause due to the file showing as whatever.vl2 (with folder options hiding the real extension zip :) ).

Jim(ChickenFinger)Bodkins
 
K got it working with the defaults.


I'm going to hate T2 scripting if it crashes every time I do something wrong... especially because it locks my gamma at max. TW looks fugly with max gamma. :cat:
 
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...
 
Plasmatic said:
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).

edit: yep, freezes


here's the new stuff:

Code:
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");
      }

$rad is the exact same thing as %dist in the onFire function
 
Last edited:
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...

Well first thing is, vectorDist returns the distance in meters between two vectors, it doesn't return a vector. So getWord on it won't return anything but the first word.

You don't need to use posFromTransform, just use %obj.getPosition or %obj.getWorldBoxCenter().

It looks as though you are appling way to much impulse, the engine no likey that and will freeze on you. I would use setVelocity instead, but will also crash if it is above 1200.
 
Thanks to Killerone for keeping the new stuff on the server. Vengeance Mod is definitly getting better!!! I had a chance to play 3 on 3 and after some getting used to the mod is a lot of fun.. Thanks again Killer and definitly thanks to ZOD.

:) and Killerone.. :wave: :phone: :rocket: :cry:

P.S. I liked the way you had the original grappling hook although I could see how it was overpowered. The skin on the rope was very cool though perhaps it can make a come back.
 
Back
Top