Would you like to react to this message? Create an account in a few clicks or log in to continue.

[tutorial]Basic Toggles

Go down

[tutorial]Basic Toggles Empty [tutorial]Basic Toggles

Post by FreckleS Thu Jan 03, 2008 12:14 am

hey guys im sure most people know how to make a simple toggle but if not here is an outline of it.
NOTE:BASIC SCRIPTING KNOWLEDGE REQUIRED.

A toggle is like a light switch there is ON and there is OFF they are toggled between by a SET command and a VSTR command

There is 2 SET's to each line of a basic toggle,
the SET of the name of your command so-
Code:
set name1
then you need your et console command so in this case of a name toggle it is
Code:
set name1 "name Name1"
but that is only the first part and to toggle between other names you need another SET
Code:
set name1 "name Name1; set nextname vstr name2"
ok now we are almost through but how do you know what name you just toggled to? you need an ECHO
Code:
set name1 "name Name1; set nextname vstr  name2; echo Renamed to-Name1"
woo that is the first half of the toggle done now you need the name2 refered to above
we use the same approach as above
Code:
set name2 "name Name2; set nextname vstr name1; echo Renamed to-Name2"
now to finish it off
Code:
set name1 "Name1; set nextname vstr name2; echo Renamed to-Name1"
set name2 "Name2; set nextname vstr name1; echo Renamed to-Name2"
set nextname "vstr name1"
bind n "vstr nextname"

FreckleS
Config Coder
Config Coder

Male
Number of posts : 13
Age : 30
Location : Underwater
MonsterPoint : 0
Respected?! : 0
Registration date : 2008-01-03

http://www.cfgworld.forumotion.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum