Forum

How to enforce script perform circular(nonstop) ?

Created 16th October 2009 @ 13:01

Add A Reply Pages: 1 2 Next »

h0stage

read topic name :p
command1->command2->command1->command2 and so on..


Last edited by h0stage,

klu

-[MG]-
MG//

what are you tyring to do?

LETIshNick

eehq

#2
it is useful for recording movie with viewmodel 1 from POV demos with no viewmodel in cfg

SnowiE

-9w-
-9m-

For LETIshNick’s post if you look at Skyride’s post here it has some useful information about how to override player settings such as viewmodels when making movies.

For the original question, I don’t really do any tf2 scripting but I guess you could do something like this –
alias “command1” “whatevercommandthatwillrunallthetime; command2”
alias “command2” “whatevercommandthatwillrunallthetime; command1”


Last edited by SnowiE,

h0stage

#2
it is useful for recording movie with viewmodel 1 from POV demos with no viewmodel in cfg

that’s one of problems which i want to solve

alias “command1” “whatevercommandthatwillrunallthetime; command2”
alias “command2” “whatevercommandthatwillrunallthetime; command1”

I’m not sure but when i tried this tf stopped answer on any request and I had to terminate the process by ctrl-alt-del(or maybe it just crashed) i’ll check it at night


Last edited by h0stage,

SnowiE

-9w-
-9m-

Well yeah I expect that would happen, you’re basically telling it to run the same command infinitely which is a bad idea with computers. Most programs will either refuse to allow you to do it or will crash.

Norris

duh i’m master in creating infinite loops.

java rocks :P


Last edited by Norris,

seraph

rEJ

Well yeah I expect that would happen, you’re basically telling it to run the same command infinitely which is a bad idea with computers. Most programs will either refuse to allow you to do it or will crash.

I have a program you might be interested in. It takes the source-code of another program and analyses it and tells you if it’ll run infinitely or not.

That might help stop the crashing.

AnimaL

:owned

start “cmd”.exe
start “cmd”.exe

goto :owned

Skyride

DUCS

Well yeah I expect that would happen, you’re basically telling it to run the same command infinitely which is a bad idea with computers. Most programs will either refuse to allow you to do it or will crash.

Yes, Im struggling to see why you would want to have a loop in a basic scripting language anyway (if you can even call it a language).

To be honest, what your asking is a B > C question. You want to achieve C so are asking us how to do B, but first we really need to know what A is.


Last edited by Skyride,

Rele

alias command1 "commandcvar1here; alias commandcircle command2; commandcircle"
alias command2 "commandcvar2here; alias commandcircle command1; commandcircle"

Start with command1.

I’m not entirely sure if this would work out and cant be bothered to think about it properly (and I also cant test it right now :P). I guess its best to trial & error.


Last edited by Rele,

Skyride

DUCS

alias command1 "commandcvar1here; alias commandcircle command2; commandcircle"<
alias command2 "commandcvar2here; alias commandcircle command1; commandcircle"

Start with command1.

I’m not entirely sure if this would work out and cant be bothered to think about it properly (and I also cant test it right now :P). I guess its best to trial & error.

Snowie already posted that, it works but it crashes TF2. :P

Rele

alias command1 "commandcvar1here; alias commandcircle command2; commandcircle"<
alias command2 "commandcvar2here; alias commandcircle command1; commandcircle"

Start with command1.

I’m not entirely sure if this would work out and cant be bothered to think about it properly (and I also cant test it right now :P). I guess its best to trial & error.

Snowie already posted that, it works but it crashes TF2. :P

No, I’m re-aliasing the aliases in between so it’s not actually the same. It *might* work out, but then again I’m not entirely sure.

EDIT: Okay wait, I think it is the same, just overcomplicated… I have to think about this again.


Last edited by Rele,

bice

If you’re just looking to override peoples viewmodel settings and whatnot for movies you could do alias r_drawviewmodel “” for example.


Last edited by bice,

Skyride

DUCS

EDIT: Okay wait, I think it is the same, just overcomplicated… I have to think about this again.

Honestly, don’t waste your time. The bottom line is that if TF2 is given a console command, it will stop everything else (graphical calcs, physics calcs, taking keyboard/mouse input) until the command has finnished executing. So if you do create an infinite loop, TF2 is going to crash. Also, everytime you run an alias you iterate deeper into the tree and therefore increase memory usage. So even if it DID work, youd still just end up with TF2 using all your RAM and then BSODing. :P

Think of aliases as like brackets in maths.

Add A Reply Pages: 1 2 Next »