|
sudin Beginner
Joined: 25 Feb 2008 Posts: 13
|
Posted: Fri Feb 29, 2008 7:51 am
activating - desactivating a class |
Hi here is my question
I have two classes : collect and rdcollect (one collecting items while walking, the other while riding)
I would like these two classes to "avoid" each other (no intersection in maths :)
so when i type #t+ collect i would like rdcollect to be desactivated (so it automatically does a #t- rdcollect)
and the reverse : when i type #t+ rdcollect i would like #t- collect to be executed
How can i do it ?
Thanks, sudin |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4715 Location: Pensacola, FL, USA
|
Posted: Fri Feb 29, 2008 8:12 am |
#ALIAS togCollect {#IF (%class(collect)) {#T- collect;#T+ rdcollect} {#T- rdcollect;#T+ collect}}
should do it, but its untested |
|
_________________ Discord: Shalimarwildcat |
|
|
|
sudin Beginner
Joined: 25 Feb 2008 Posts: 13
|
Posted: Fri Feb 29, 2008 10:30 am |
Thanks for you answer. A perfect solution. Here is the code i will use :
Code: |
#IF (%trigger( collect)) {
#CLASS collect off
#CLASS rdcollect on
} {
#CLASS collect on
#CLASS rdcollect off
}
|
Really a great idea thanks |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4715 Location: Pensacola, FL, USA
|
Posted: Fri Feb 29, 2008 11:15 am |
i like turning off the old one first so that at no time are both active
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
sudin Beginner
Joined: 25 Feb 2008 Posts: 13
|
Posted: Fri Feb 29, 2008 1:34 pm |
ok) i will swap them :) thanks
|
|
|
|
|
|