Help making an alias command

Discussions about UT99
Post Reply
rsbloom44
Experienced
Posts: 124
Joined: Mon Jan 30, 2012 9:46 am

Help making an alias command

Post by rsbloom44 »

I'm trying to make 1 key bind to turn on/off timedemo instead of having two separate binds.
I was thinking it should look something like this:

Aliases[29]=(Command="timedemo 1 |set input Key g",Alias=demo)
Aliases[29+1]=(Command="timedemo 0 |set input Key g",Alias=demo)

What am I doing wrong? :noidea
User avatar
Chamberly
Godlike
Posts: 1963
Joined: Sat Sep 17, 2011 4:32 pm
Personal rank: Dame. Vandora
Location: TN, USA
Contact:

Re: Help making an alias command

Post by Chamberly »

Well, there is just more than that.

Normally when you start "recording" the demo, it have to have a name for the demo. [demorec name]
Then stopping the demo. [stopdemo]

I am not sure if you have heard of Demo Manager?
rsbloom44
Experienced
Posts: 124
Joined: Mon Jan 30, 2012 9:46 am

Re: Help making an alias command

Post by rsbloom44 »

I am not trying to record a demo. If you type timedemo 1 into the console it shows your fps.
User avatar
Wormbo
Adept
Posts: 258
Joined: Sat Aug 24, 2013 6:04 pm
Contact:

Re: Help making an alias command

Post by Wormbo »

  • The part in square brackets is supposed to be a number, not some kind of mathematical expression. Each alias must have its own number between 0 and 39.
  • Each alias must have a unique name, because they are always active. Consequently your aliases should be called something like FpsOn and FpsOff, or whatever makes sense to you.
  • The SET command's syntax for keybinds is "set input keyname command", where keyname is the name of the key you want to bind the command to (see below the Aliases list in the [Engine.Info] section for examples) and command is a console command or alias name.
  • I hope you remembered to bind the initial command to a key as well.
rsbloom44
Experienced
Posts: 124
Joined: Mon Jan 30, 2012 9:46 am

Re: Help making an alias command

Post by rsbloom44 »

My understanding was the +1 to the alias number meant it was an extension of it.

So this is what I got now

Aliases[29]=(Command="timedemo 1 |set input Key g ",Alias=FpsOn)
Aliases[30]=(Command="timedemo 0 |set input Key g ",Alias=FpsOff)

I'm a little confused though, since I just wanted 1 keybinding how do I bind my key to the alias?
G=FpsOn|FpsOff - something like that?
ASLY

Re: Help making an alias command

Post by ASLY »

Use XConsole 3.5
Download: http://medor.no-ip.org/index.php?dir=Ut ... 5.0rc2.zip

Setup XConsole Demo:
  • Play Mode - ?timebased
  • Auto Rec - Online Only
  • All Games
  • 1ST Person
I hope this will help for you.

Image
DeathoX 8
Experienced
Posts: 109
Joined: Sun Mar 27, 2011 12:56 pm

Re: Help making an alias command

Post by DeathoX 8 »

I'm haven't misunderstood you are trying to have a button to toggle between timedemo 0 and 1?

It's been a while since I've messed with aliases so I don't really recall the formatting, but IIRC something like this should work:

Aliases[29]=(Command="timedemo 1 |set input g FpsOff ",Alias=FpsOn)
Aliases[30]=(Command="timedemo 0 |set input g FpsOn ",Alias=FpsOff)

G=FpsOn
User avatar
Wormbo
Adept
Posts: 258
Joined: Sat Aug 24, 2013 6:04 pm
Contact:

Re: Help making an alias command

Post by Wormbo »

Indeed. The idea is that by executing one alias, it automatically rebinds the key to the other alias to achieve the toggling. There's really nothing complicated about it if you understand that aliases are replaced by their corresponding command string when you execute them.
rsbloom44
Experienced
Posts: 124
Joined: Mon Jan 30, 2012 9:46 am

Re: Help making an alias command

Post by rsbloom44 »

Thank you everyone for your help.
DeathoX 8 wrote: Aliases[29]=(Command="timedemo 1 |set input g FpsOff ",Alias=FpsOn)
Aliases[30]=(Command="timedemo 0 |set input g FpsOn ",Alias=FpsOff)
G=FpsOn
This worked.
User avatar
Chamberly
Godlike
Posts: 1963
Joined: Sat Sep 17, 2011 4:32 pm
Personal rank: Dame. Vandora
Location: TN, USA
Contact:

Re: Help making an alias command

Post by Chamberly »

Oh ok. Thanks, I may try this. :)
Post Reply