It is currently Sun Dec 06, 2009 8:45 pm

Welcome
Welcome to <strong>tssmods</strong>.

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. Registration is fast, simple, and absolutely free, so please, <a href="/profile.php?mode=register">join our community today</a>!


Post a new topicPost a reply Page 1 of 1   [ 8 posts ]
Author Message
 Post subject: A few little finds
PostPosted: Tue May 05, 2009 7:58 am 

Joined: Mon May 04, 2009 8:46 am
Posts: 30
Just thought I'd post a few things that I found.

These were done with a few modifications to the original source code.

Console:
Image

Gun lighting effect:
Image


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 06, 2009 6:36 pm 
Site Admin

Joined: Wed Nov 28, 2007 8:22 pm
Posts: 42
You might want to post up the code.


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 06, 2009 8:23 pm 

Joined: Mon May 04, 2009 8:46 am
Posts: 30
For the console, just compile the actual source code into an exe, and using that exe, press F11 or F12 ingame.

For the gun flash effect, it's a bit more work.

In TssCars.pas, under TTssPlayer.Move:

Add a variable, something like
Code:
TheGun : TTssPistol;


Under this section of the code (still in TTssPlayer.Move)

Code:
    if Engine.Controls.MouseRightClicked>0 then if (not FightMode) or (not Hitting) then FightMode:=not FightMode;


Change it to something like this:
Code:
  if Engine.Controls.MouseRightClicked>0 then if (not FightMode) or (not Hitting) then
  begin
  FightMode:=not FightMode;
  // Give the player a weapon.
  TheGun := TTssPistol.Create(Self, True);
  ObjRight := TheGun;
  end;


Add this bit of code in right after the previous code:
Code:
  // If you let go of the mouse, you're not shooting/hitting.
  if Engine.Controls.MouseLeftClicked = 0 then
    Hitting:= false;


And that's it. Now ingame you right click once, and then start left clicking and the flash should appear around your character.

Tell me if it works/doesn't work.


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 07, 2009 1:26 am 
Site Admin

Joined: Wed Nov 28, 2007 8:22 pm
Posts: 42
Code:
procedure TTssPlayer.Move(TickCount: Single);
var Vector, Vector2,{ Vector3,} NewPos: TD3DXVector3;
    Temp, Temp2, Temp3: Single;
    TObj: TTssObject;
    TheGun : TTssPistol;
    I, J: integer;
    OldQ, TargetQ: TD3DXQuaternion;
    M1{, M2}: TD3DXMatrix;
    List: TList;
begin
if Car=nil then begin
  Controls.WalkZ:=Ord(Engine.Controls.GameKeyDown(keyWalkForward, Key_NoWait))-0.5*Ord(Engine.Controls.GameKeyDown(keyWalkBackward, Key_NoWait));
  //Controls.WalkX:=0.5*Ord(Engine.Controls.GameKeyDown(keyWalkRight, Key_NoWait))-0.5*Ord(Engine.Controls.GameKeyDown(keyWalkLeft, Key_NoWait));
  //Controls.TurnY:=Engine.Controls.MouseMoveX;
  //Controls.TurnX:=(1-2*Ord(Options.InvertMouse))*Engine.Controls.MouseMoveY;
  Controls.TurnY:=(0.0007*Ord(Engine.Controls.GameKeyDown(keyWalkRight, Key_NoWait))-0.0007*Ord(Engine.Controls.GameKeyDown(keyWalkLeft, Key_NoWait)))*TickCount;
if Engine.Controls.MouseRightClicked>0 then if (not FightMode) or (not Hitting) then
  begin
  FightMode:=not FightMode;
  // Give the player a weapon.
  TheGun := TTssPistol.Create(Self, True);
  ObjRight := TheGun;
  end;
  // If you let go of the mouse, you're not shooting/hitting.
  if Engine.Controls.MouseLeftClicked = 0 then
    Hitting:= false;


This is what I got, can't get the gun to work. But I got on Console working.


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 07, 2009 5:16 am 

Joined: Mon May 04, 2009 8:46 am
Posts: 30
What you have to do is right click once in game (nothing will seem to happen) and then left click, and a gun lighting effect should happen.

And with the console, were you able to see text in it?


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 07, 2009 7:36 am 
Site Admin

Joined: Wed Nov 28, 2007 8:22 pm
Posts: 42
No text.


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 07, 2009 9:38 am 
Site Admin

Joined: Thu May 07, 2009 9:34 am
Posts: 23
We need all of fans to work on it. just create a team!


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 09, 2009 3:03 am 

Joined: Mon May 04, 2009 8:46 am
Posts: 30
Well, I got the console text to display.

For anyone that wants to do it, in TssConsole.pas:

Under TTssConsole.Draw:

Find the line
Code:
Engine.Textures.DrawText2D(0, 0.20, 0.525-Min(16, FBuffer.Count)*0.02, 0.0, 0.0, 0.02, 0.02, S);

And replace it with
Code:
Engine.Textures.DrawText2DShadow(0, {0.005, 0.00}0.20,0.525-Min(16,FBuffer.Count)*0.02, 0.0175, 0.015, 0.0, 0.0, 0.0, 0.0015,
   0.0015, D3DCOLOR_ARGB(100, 0, 0, 0), D3DCOLOR_ARGB(255, 255, 255, 255), S);


And find the line
Code:
Engine.Textures.DrawText2D(1, 0.20, 0.535, 0.0, 0.0, 0.02, 0.02, FCommandStr);

And replace it with
Code:
  Engine.Textures.DrawText2DShadow(0, {0.005, 0.00}0.20,0.535, 0.0175, 0.015, 0.0, 0.0, 0.0, 0.0015,
   0.0015, D3DCOLOR_ARGB(100, 0, 0, 0), D3DCOLOR_ARGB(255, 255, 255, 255), FCommandStr);


You should now get nice yellow text, much like the debug menu text :D


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 8 posts ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron