Alliedassault           
FAQ Calendar
Go Back   Alliedassault > Lounge > Tech Questions & Problems
Reload this Page reading variables in scripts?
Tech Questions & Problems Ask our resident experts about any military shooter game server administration and other technical issues.

Reply
 
Thread Tools Display Modes
reading variables in scripts?
Old
  (#1)
babedieboe is Offline
Member
 
Posts: 32
Join Date: May 2002
   
Default reading variables in scripts? - 01-12-2003, 04:54 AM

is it possible to parse variables in cfg-scripts?

f.e.

set variable1 "test"

and then

echo $test

i know this doesnt work, but is there any other way?
If its not possible, then how do i program it for client-side
purposes? what kind of file (tiki) and how is it loaded at startup?

Thanks!
  
Reply With Quote
Old
  (#2)
{|TFO|} [1st] Pvt. IxQue is Offline
Junior Member
 
Posts: 8
Join Date: Jan 2003
Location: Heemstede, The Netherlands
  Send a message via MSN to {|TFO|} [1st] Pvt. IxQue  
Default 01-13-2003, 03:07 PM

are you a programmer ? my not, but what your're typing there is PHP, not C++ or some other gaming programming langues oOo: swordfight:
  
Reply With Quote
Old
  (#3)
babedieboe is Offline
Member
 
Posts: 32
Join Date: May 2002
   
Default 01-14-2003, 11:28 AM

echo and set are moh-console commands.........
  
Reply With Quote
Old
  (#4)
SuPeRn00b is Offline
Member
 
Posts: 65
Join Date: Apr 2003
   
Default 04-06-2003, 09:34 PM

Example 1:
[code:ef483]// Let's say current yaw-speed is 600

// $VAR will be 600 now
set VAR "cl_yawspeed"

// F5 sets yaw-speed to 8000
bind F5 "set cl_yawspeed 8000"

// F6 puts it back to 600
bind F6 "set cl_yawspeed $VAR"[/code:ef483]

Example 2:
[code:ef483]// Let's say current yaw-speed is 600

// $VAR will be 600 now
set VAR "cl_yawspeed"

// wazaa1 sets yaw-speed to 8000 and spins to right
alias wazaa1 "set cl_yawspeed 8000; +right"

// wazaa1 stops spinning and puts the yaw-speed back to 600
alias wazaa2 "-right; set cl_yawspeed $VAR"

// starts spinning and binds F5 to off (to stop spinning)
alias on "wazaa1; bind F5 off"

// stops spinning and binds F5 to on (to start spinning again)
alias off "wazaa2; bind F5 on"

// F5 will run the "on" commands
bind F5 "on"[/code:ef483]

Hope this helps evil:
  
Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.12 by ScriptzBin
Copyright ©2000 - 2025, vBulletin Solutions Inc.
vBulletin Skin developed by: vBStyles.com
© 1998 - 2007 by Rudedog Productions | All trademarks used are properties of their respective owners. All rights reserved.