Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 7 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Soldier of Fortune
Category: SoFII General
General game questions, comments and chat.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Having problems understanding scripts
-Apophis-~rb
General Member
Since: Dec 23, 2006
Posts: 13
Last: Dec 23, 2006
[view latest posts]
Level 1
Category: SoFII General
Posted: Sunday, Feb. 2, 2003 11:48 am
I would like to set a script to:
1, Jump higher (like everyone else seems to do)
2, Change crosshaire to more visable icon

I have copied some cripts from this site to do these, entered this into a file called Autoexec.cfg and placed it in my \base\mp folder. I start a MP game, bring up the console, enter "exec autoexec.cfg" the console replys with "executing autoexec.cfg", but thats it. I still cant jump, and i can still only get my normal crosshairs. I have created my *.cfg file using notepad. Here is what i have entered into the file:

//Crosshair & FOV Switcher

seta cg_crosshairSize "64"
seta cg_crosshairX "-2"
seta cg_crosshairY "-3"
seta mz_chA "vstr mz_chLight"
seta mz_chB "cg_crosshairRGBA 1,1,1,1"
seta mz_chDark "cg_crosshairRGBA 0.1,0.1,0.1,0.7"
seta mz_chLight "cg_crosshairRGBA 0.8,0.8,0.8,0.7"
seta mz_chDark_on "set mz_chA vstr mz_chDark;set mz_chSwitch vstr mz_chLight_on;vstr mz_chDark"
seta mz_chLight_on "set mz_chA vstr mz_chLight;set mz_chSwitch vstr mz_chDark_on;vstr mz_chLight"
seta mz_chSwitch "vstr mz_chDark_on"
bind * "vstr mz_chSwitch"
seta cg_crosshairRGBA "0.7,0.7,0.7,0.4"
seta cg_crosshairFriendRGBA "0,1,0.5,1"
seta mz_on "weaptoggle primary;vstr mz_chB;cg_drawcrosshair 1;cg_crosshairsize 8;cg_crosshairX 0;cg_crosshairY 0;cg_fov 80;m_pitch 0.010;m_yaw 0.018;set mz_switch vstr mz_off"
seta mz_off "weaptoggle secondary;vstr mz_chA;cg_drawcrosshair 1;cg_crosshairsize 64;cg_crosshairX -2;cg_crosshairY -2;cg_fov 90;m_pitch 0.018;m_yaw 0.022;set mz_switch vstr mz_on"
seta mz_switch "vstr mz_on"
bind MOUSE3 "vstr mz_switch"


// Advanced Crouch Lock & Jump Crouch Combo

set md_01 "set crouch vstr md_02; +movedown"
set md_02 "set crouch vstr md_01; -movedown"
vstr md_02 // Default
set jump "vstr md_02; +moveup; wait 4; -moveup; wait 4; +movedown; wait 4; -movedown"
bind x "vstr crouch" // Crouch Lock
bind x "vstr jump" // Jump Crouch

Could someone please advise as to where i can find more information on writing scripts for games, I dont mind doing the homework, just cant find it to do...

Thanks everyone, look forward to shooting you one day ! :D
Share |
spike232~rb
General Member
Since: Dec 23, 2006
Posts: 5892
Last: Dec 23, 2006
[view latest posts]
Level 10
Category: SoFII General
Posted: Sunday, Feb. 2, 2003 12:42 pm
hmmm  ???

well as for the jump/crouch script u need to change the lines:
bind x "vstr crouch" // Crouch Lock
bind x "vstr jump" // Jump Crouch

x is a convention to say "your button here" so this is binding each to the x button so only the jump will work, so u need to change x to the key u want for each.

for the crosshair one:

seta cg_crosshairFriendRGBA "0,1,0.5,1"
has the wrong number of arguments its missing alpha component.

but u seem to have implemented a crosshair switcher, is this what u want?? if u just want to set it and never change it just use

seta cg_crosshairSize ""
seta cg_crosshairX ""
seta cg_crosshairY ""
seta cg_crosshairRGBA ""
seta cg_crosshairFriendRGBA ""

with the values u want
Share |
-Apophis-~rb
General Member
Since: Dec 23, 2006
Posts: 13
Last: Dec 23, 2006
[view latest posts]
Level 1
Category: SoFII General
Posted: Sunday, Feb. 2, 2003 02:43 pm
Thanks for your input Spike, but i still cant get it to work!

May i ask a really big favour... Please, if you wouldn't ming, write down what i need in the autoexec.cfg file to do the following.

1, Combine jump and crouch keys so that i can use mouse button 2 to jump onto boxes etc.

and

2, that gives me a crosshair of -.- (bold) that is navy blue, and changes to red when a target is front.

I also thought that by putting it in an autoexec.cfg file it would auto run when game started? is this right, or do i have to run from console each time?

Thank you very much,

(NB, Are you the same Spike who has helped with RTCW problems in the past?)
Share |
spike232~rb
General Member
Since: Dec 23, 2006
Posts: 5892
Last: Dec 23, 2006
[view latest posts]
Level 10
Category: SoFII General
Posted: Sunday, Feb. 2, 2003 03:15 pm
Code Sample
seta cg_crosshairRGBA "0.19,0,0.63,1"
seta cg_crosshairFriendRGBA "1,0,0,1"

//Jump Crouch Combo
set jump "vstr md_02; +moveup; wait 4; -moveup; wait 4; +movedown; wait 4; -movedown"

bind mouse2 "vstr jump" // Jump Crouch


that should work
note it will turn read when over friends not enemies (the game does not let the crosshair identify enimies for ovious reasons

the autoexec.cfg file is automaticly loaded every time the game starts.

Quote
(NB, Are you the same Spike who has helped with RTCW problems in the past?)


possibly, but i aint been at the RTCW forums in a while
Share |
-Apophis-~rb
General Member
Since: Dec 23, 2006
Posts: 13
Last: Dec 23, 2006
[view latest posts]
Level 1
Category: SoFII General
Posted: Sunday, Feb. 2, 2003 06:34 pm
That's great, thank you for spending the time to write that down for us. I have managed to get it to work now, but found the cause of the problem to be a file called "cross.cfg.txt" in the same folder, since i have removed it, everything i enter into autoexec.cfg now works.

I ave entered your text and it gives us the effects we wanted.

Thanks again, see you around,

Phil (-Apophis-)
Share |
-Apotheosis-Zeus~rb
General Member
Since: Dec 23, 2006
Posts: 306
Last: Dec 23, 2006
[view latest posts]
Level 5
Category: SoFII General
Posted: Monday, Feb. 3, 2003 04:18 am
Spike if you read this please help. What does changing the X and Y values do? I have changed the color and size to my liking. My problem is this. When I am on an RMG I can have the retical directly on my target and not hit them. The crosshair size is 15.  I fire in short bursts and strafe in the same direction as my opponent as much as possible. I can sometimes empty a clip at my opponent before killing them as we are both advancing toward each other in battle. I usually ping between 30-50 to servers here in the US.
Do I need to lead my opponent more? Please help.

Thanks,

Zeus
Share |
Booda~rb
General Member
Since: Dec 23, 2006
Posts: 953
Last: Dec 23, 2006
[view latest posts]
Level 7
Category: SoFII General
Posted: Monday, Feb. 3, 2003 05:43 am
Thats my weapon changing script you've got there. :) Probably a bit much for just a crosshair colour.

I changed the X and Y offset very slighty, just as a matter of personal opinion that it centers the dot better. Changing the X and Y won't change where your gun shoots, just where the dot is on the screen.
Share |
-Apotheosis-Zeus~rb
General Member
Since: Dec 23, 2006
Posts: 306
Last: Dec 23, 2006
[view latest posts]
Level 5
Category: SoFII General
Posted: Monday, Feb. 3, 2003 06:25 am
Ok I got ya. Maybe I need to do a little more work on my aim then. I put it to a test and had someone stand at a far distance and where my crosshair registered a person was not what was showing on the screen. This was done with a person just standing no movement by me or him. Could I have something set wrong?

Zeus
Share |
Booda~rb
General Member
Since: Dec 23, 2006
Posts: 953
Last: Dec 23, 2006
[view latest posts]
Level 7
Category: SoFII General
Posted: Monday, Feb. 3, 2003 11:34 pm
I doubt there's anything wrong. Try this map (186kb) and see how your crosshair lines up with your bullets. I made this map when the game first came out to do some experiments with the weapons spread and accuracy.
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Soldier of Fortune : SoFII General

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»