View Full Version : help me, i need it
ThatForceDude
06-11-2002, 01:53 PM
Anyone know how to get external crosshairs in JK?
Lord_Grismath
06-11-2002, 02:29 PM
http://www.massassi.net/tutorials/crosshair/
Nuff said.
ThatForceDude
06-11-2002, 05:03 PM
not quite enough, i can't figure it out. i know, i suck, i shouldn't be editing, but I have to start somewhere, don't I?
SaberMaster
06-12-2002, 10:27 AM
Everyone has to start somewhere. http://forums.massassi.net/html/wink.gif
That tutorial will do what you want, but the cog and templates are far from perfect. Here's a simple cog that will work:
# crosshair.cog
#
# This cog uses a fast pulse to create an
# external crosshair in front of the player.
#
# [SM]
#================================================= =====================#
symbols
thing player local
template chtemp=+crosshair local
message newplayer
message pulse
message killed
end
#================================================= =====================#
code
#----------------------------------------------------------------
newplayer:
player = GetSenderRef();
SetPulse(0.001);
Return;
#----------------------------------------------------------------
pulse:
if(GetCurrentCamera() == 1 && GetThingHealth(player) > 0)
FireProjectile(player, chtemp, -1, -1, '0 0.2 0', '0 0 0', 0, 0, 0, 0);
Return;
#----------------------------------------------------------------
killed:
SetPulse(0);
Return;
#----------------------------------------------------------------
end
You will want to change the offset used by FireProjectile(). As it is, the offset is '0 0.2 0'. This will make the crosshair sprite appear 0.2 JKUs in front of the player. Here's the templates to use:
_based none orient=(0/0/0) type=weapon move=physics timer=0.01
+crosshair _based sprite=crosshair.spr
Were you able to figure out how to use the tutorial's crosshair? Make sure that you have the crosshair.cog, static.jkl, crosshair.spr, and crosshair.mat in their appropriate directories. And make sure that you have an entry for crosshair.cog in your items.dat. It should be something like:
crosshair 116 0 0 0x000 cog=crosshair.cog
Ok, if you still don't understand how to get the crosshair working, ask more specific questions, and I'll explain. http://forums.massassi.net/html/wink.gif
------------------
Author of the JK DataMaster (http://www.geocities.com/sabersdomain/fileframe.html), Parsec (http://www.geocities.com/sabersdomain/fileframe.html), and the EditPlus Cog Files (http://www.geocities.com/sabersdomain/fileframe.html).
Visit Saber's Domain (http://www.geocities.com/sabersdomain).
[This message has been edited by SaberMaster (edited June 12, 2002).]
ThatForceDude
06-12-2002, 11:27 AM
with the tutorial, i had the hotkey (it wouldn't let me bind it though) but the main crosshair was still the same. i'm about to try your cog.
ThatForceDude
06-12-2002, 11:38 AM
Well, i con't quite figure out where to put your line in items.dat. where does it go?
Wave_Of_Mutilation
06-13-2002, 12:10 PM
One thing I have also noticed, is that the players eyeoffset must be taken into account when making external crosshairs. Otherwise the crosshair will be off. The players eyes are actually set 0.037 (or something like that, check the walkplayer template) on the z axis.
It took me a while to realise that was why my crosshairs were always off, so I thought I'd save you the same frustration.
TNC_Sidious
06-14-2002, 10:42 AM
<font face="Verdana, Arial" size="2">Originally posted by Lord_Grismath:
http://www.massassi.net/tutorials/crosshair/
Nuff said.</font>
------------------
Come to: http://shiningsaber.cjb.net
for the best star wars fanfilms ever!
mailto:satish.solanki77@ntlworld.comsatish.solanki 77@ntlworld.com</A>
SaberMaster
06-15-2002, 09:36 AM
That code for the items bin goes near the end of the items.dat file. Put it right after the last goal bin. Don't use the tutorial's items.dat. Instead, extract a new one from Res2.gob.
Remember that the method I propose is a simple, bugless version of the original. My cog does not use a hotkey to change the crosshair. Though if you want, I can add it. http://forums.massassi.net/html/wink.gif
Sidious, you have no idea. http://forums.massassi.net/html/tongue.gif
------------------
Author of the JK DataMaster (http://www.geocities.com/sabersdomain/fileframe.html), Parsec (http://www.geocities.com/sabersdomain/fileframe.html), and the EditPlus Cog Files (http://www.geocities.com/sabersdomain/fileframe.html).
Visit Saber's Domain (http://www.geocities.com/sabersdomain).
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.