Urban Terror Forums: If/then Scripts - Urban Terror Forums

Jump to content

 Login | Register 
Advertisement
Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

If/then Scripts Rate Topic: -----

Are they possible?

#1 User is offline   death2traitor Icon

Posted 26 January 2013 - 12:27 AM

Hey all, trying to play around with some scripts and I'm wondering if an "if/then" script is possible.
Mainly looking for something like if I have my primary weapon selected, the script will run, and if a secondary weapons is selected the script won't run.
Is this possible? I haven't really seen any script commands like this in any example I've seen.
Thanks in advance.

#2 User is offline   JRandomNoob Icon

  •   moderator   
    Community Moderator

Posted 26 January 2013 - 01:34 AM

Not quite. Quake scripting is extremely limited.

However, you can switch between two (or more) behaviors with the keys you use for weapon switching, for example, changing MOUSE2 from zoom to FOV toggle and back when you switch between sniper and pistol:

bind 2 "ut_weaptoggle primary; bind MOUSE2 ut_zoomin; cg_fov 110" // reset when you switch to sniper while in FOV 90
bind 3 "ut_weaptoggle sidearm; bind MOUSE2 vstr iron"

set iron "vstr ironon"
set ironon "cg_fov 90; set iron vstr ironoff"
set ironoff "cg_fov 110; set iron vstr ironon"

dswp.de
Beginner’s Guide to Urban Terror (woefully out of date)
Daily Deadnade (Last updated September 9, 2016)

#3 User is offline   death2traitor Icon

Posted 26 January 2013 - 03:38 AM

Not exactly what I needed but it got me on the right track (sort of :rolleyes: ) and I managed to figure it out. so thanks!

#4 User is offline   baex Icon

  • Account: baex
  • Country:
  • Joined: 23-May 12
  • Posts: 83

Posted 26 January 2013 - 09:48 AM

/

This post has been edited by baeX: 26 January 2013 - 05:15 PM

View PostNounou, on 01 December 2012 - 12:33 AM, said:

Hey I love you baex, but also, consider that i'm drunk

#5 User is offline   JRandomNoob Icon

  •   moderator   
    Community Moderator

Posted 26 January 2013 - 09:55 AM

View PostbaeX, on 26 January 2013 - 09:48 AM, said:

You cant bind binds. If you want the script to work you have to add two cfg's

Bollocks.
dswp.de
Beginner’s Guide to Urban Terror (woefully out of date)
Daily Deadnade (Last updated September 9, 2016)

bullet_loaderAdvertisement

#6 User is offline   baex Icon

  • Account: baex
  • Country:
  • Joined: 23-May 12
  • Posts: 83

Posted 26 January 2013 - 05:15 PM

View PostJRandomNoob, on 26 January 2013 - 09:55 AM, said:

Bollocks.


hehehehehhehehe sry my mistake

:$

View PostNounou, on 01 December 2012 - 12:33 AM, said:

Hey I love you baex, but also, consider that i'm drunk

#7 User is offline   JRandomNoob Icon

  •   moderator   
    Community Moderator

Posted 27 January 2013 - 01:14 AM

:-P
dswp.de
Beginner’s Guide to Urban Terror (woefully out of date)
Daily Deadnade (Last updated September 9, 2016)

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users

Advertisement


Copyright © 1999-2024 Frozensand Games Limited  |  All rights reserved  |  Urban Terror™ and FrozenSand™ are trademarks of Frozensand Games Limited

Frozensand Games is a Limited company registered in England and Wales. Company Reg No: 10343942