Variables!

Discuss anything to do with Nexuiz here.

Moderators: Nexuiz Moderators, Moderators

Variables!

Postby shaggy » Wed Apr 04, 2007 11:08 am

icould you please inform me about variables

e.g in the alias were you change from model to model over and over what would you do ?

this i s what i have entered
alias "+model" +playermodel models/player/nexus.zym ;
alias "-model" -playermodel models/player/marine.zym
bind , "model"

it starts to work the it gets stuck so would i type restart or something?


sorry all about this post
shaggy
Alien trapper
 
Posts: 419
Joined: Tue Apr 03, 2007 6:12 am

Postby divVerent » Wed Apr 04, 2007 11:45 am

Don't.

Seriously - if a server admin allows you, he will tell you. If he doesn't, it can earn you a kick or even a ban.
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again

You can vary the number of "MS", so you can clearly see it's MS which is causing it.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Postby C.Brutail » Wed Apr 04, 2007 11:45 am

I'm not as much familiar with console commands in nexuiz, but this is somehwat bad.

First of, if you make an alias with + - , it means:
+ : Make stuff when button is pressed and HELD DOWN
-: When button is released.

So if you make an alias:

Code: Select all
alias "+model" playermodel models/player/nexus.zym
alias "-model" playermodel models/player/marine.zym
bind , "+model"


it will only change your model when you press down and hold the button. Note, that you don't need a + or - before the actual command (+playermodel or -playermodel is not a valid command).
I think you wanna make a button that changes your playermodel when it's pressed, and when it's pressed again changes to another one. This can be done this way:

Code: Select all
alias "model_nexus" playermodel models/player/nexus.zym ; bind , "model_marine"
alias "model_marine" playermodel models/player/marine.zym ; bind , "model_nexus"
bind , "model_marine"


And no problem for your question, we're here to help you :)
And btw. this is only an example. Don't change your model from time to time. Confusing for those who play with you. But if you wanna make multiple chats, not only one (eg. 20 type of ":)" it can easily done by this way)
Last edited by C.Brutail on Wed Apr 04, 2007 12:01 pm, edited 3 times in total.
"One should strive to achieve; not sit in bitter regret."
WE ARE NEXUIZ.
Image
Image
C.Brutail
Laidback mapper
 
Posts: 2357
Joined: Tue Feb 28, 2006 7:26 pm
Location: Ironforge

Postby divVerent » Wed Apr 04, 2007 11:46 am

Actually, the bind would need the leading plus sign too - and it gets replaced by a minus sign when releasing the key.
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again

You can vary the number of "MS", so you can clearly see it's MS which is causing it.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Postby shaggy » Wed Apr 04, 2007 12:08 pm

thanks for that but it didnt work

and could i make that happen over and over without holding then leting go?
shaggy
Alien trapper
 
Posts: 419
Joined: Tue Apr 03, 2007 6:12 am

Postby C.Brutail » Wed Apr 04, 2007 12:34 pm

As div0 pointed out, NO. Don't even think of that.
"One should strive to achieve; not sit in bitter regret."
WE ARE NEXUIZ.
Image
Image
C.Brutail
Laidback mapper
 
Posts: 2357
Joined: Tue Feb 28, 2006 7:26 pm
Location: Ironforge

Postby divVerent » Wed Apr 04, 2007 1:11 pm

shaggy! wrote:and could i make that happen over and over without holding then leting go?


The only way to do that is by using this scheme...

alias p1 "do whatever you want; wait; wait; wait; wait; wait; wait; wait; wait; wait; wait; wait; wait; wait; wait; wait; wait; wait; wait; wait; wait; wait; wait; wait; wait; wait; p2"
alias p2 "do whatever you want; wait; wait; wait; wait; wait; wait; wait; wait; wait; wait; wait; wait; wait; wait; wait; wait; wait; wait; wait; wait; wait; wait; wait; wait; wait; p1"

However... if you run such a monster, you can't use the game any more as no input whatsoever will work - the game will hang in an endless loop and not even respond to the quit command!

There is no way to do timed events in the Nexuiz console, and scripts like you want are the reason why there is no advanced programmable console. The console is Turing complete, that is, you can calculate everything with it - but there are no timed events or server message events. And there won't.

So that leaves two ways to do such effects: zbqvsl gur ratvar naq chg gur pbqr sbe gung qverpgyl va vg - be nccebkvzngr jung lbh jnag ol pyrire hfr bs vachg ovaqvatf. You should now know all you need to do the latter. But if you try it on my servers and people complain, it will earn you a kickban.

You have been warned.
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again

You can vary the number of "MS", so you can clearly see it's MS which is causing it.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Postby The mysterious Mr. 4m » Wed Apr 04, 2007 7:36 pm

i guess what Shaggy means is the Peacebrothers color/model-changing patch.

please, only use this kind of things on PB servers only!
4m [PB] (amoebios)

This is Your world.
The mysterious Mr. 4m
Forum addon
 
Posts: 1402
Joined: Wed Mar 01, 2006 6:03 pm
Location: germany

Postby esteel » Wed Apr 04, 2007 9:25 pm

Its kinda funny.. when people have the freedom to do what they please to there are people that tend to misuse that freedom to annoy others. If you take away that freedom however all other complain. So what left is a way to ignore such things. Meaning in the long run it will be necessary to be able to ignore chat, ignore chat from certain people, force player models and colors on the others, as its impossible to ignore teamkiller its needed not only to kick punks but to kickban them, in team matches one would also need 'weapon stay' as some team mates are just annoying by collecting everything.. so in the even longer run people might learn its better to play chess as you can just punsh punks in the face because they sit next to you :P

Hmm i just hope noone really follows that logic.. but still its interesting..
esteel
Site admin and forum addon
 
Posts: 3924
Joined: Wed Mar 01, 2006 8:27 am

Postby shaggy » Thu Apr 05, 2007 8:52 am

yea but that helps make the game intresting
shaggy
Alien trapper
 
Posts: 419
Joined: Tue Apr 03, 2007 6:12 am

Next

Return to Nexuiz - General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron