| View previous topic :: View next topic |
| Author |
Message |
Gaebryal
Joined: 24 Jan 2011 Posts: 19
|
Posted: Mon Mar 07, 2011 4:34 pm Post subject: Nesting |
|
|
what is the correct syntax for this, ive tried all kinds of combinations
this action works fine, but its always on, untill its triggered, then its "deleted"
| Code: | #ACTION {The %1 is closed.} {
#SHOWME Door Set to <aff>%1;
#VAR doorVariable {%1};
#UNACTION {The %%1 is closed.}
}; |
i want to make it so it only works when i push an alias, something similar to this, except it doesnt work so my question is how do i make this work
| Code: | #ALIAS ln {
#ACTION {The %1 is closed.} {
#SHOWME Door Set to <aff>%1;
#VAR doorVariable {%1};
#UNACTION {The %%1 is closed.}
};
look north
} |
i mean i could make a a file like "doortriggers.tin and then read it in and kill the class but surely theres another way to do it? |
|
| Back to top |
|
 |
Scandum Site Admin
Joined: 03 Dec 2004 Posts: 3274
|
Posted: Mon Mar 07, 2011 9:59 pm Post subject: |
|
|
Replace %1 with %%1 and it should work.  |
|
| Back to top |
|
 |
Gaebryal
Joined: 24 Jan 2011 Posts: 19
|
Posted: Tue Mar 08, 2011 2:25 pm Post subject: |
|
|
still isnt working right, the problem is the UNACTION isnt going off and deleting it, so after i type [ln] anytime i see The * is closed. it says "SET THE DOOR"
for instance when i type [look north] i should see "the door is closed" and nothing happens, only when i type [ln] but because the UNACTION isnt going off, after i type [ln] the first time then both [ln] and [look north] show me "SET THE DOOR"
in this form the UNACTION never fires:
| Code: | #ALIAS ln {
#ACTION {The %%1 is closed.} {
#SHOWME SET THE DOOR!;
#UNACTION {The %%1 is closed.};
};
look north
} |
can an can you nest that UNACTION inside an ACTION?
| Code: | * HP:Healthy MV:Full > #killall
#KILL - ALL LISTS CLEARED.
* HP:Healthy MV:Full > #read Doorscript.tin
--- DoorScript.tin Loaded ---
#OK: 4 ALIASES LOADED.
#OK: 1 CLASS LOADED.
#OK: 1 CONFIG LOADED.
#OK: 2 MACROS LOADED.
#OK: 1 VARIABLE LOADED.
#act
################################### ACTIONS ####################################
ln
The door is open.
* HP:Healthy MV:Full > #act
################################### ACTIONS ####################################
#ACTION {The %1 is closed.}={#SHOWME SET THE DOOR!;#UNACTION {The %1 is
closed.};} @ {5}
* HP:Healthy MV:Full > cl door
Ok.
* HP:Healthy MV:Full > ln
SET THE DOOR!
The door is closed. <-- now it should delete the action and not go off again till i hit [ln]
* HP:Healthy MV:Full > look north
* HP:Healthy MV:Full >
SET THE DOOR!
The door is closed. <-- still goes off, not working
|
|
|
| Back to top |
|
 |
Scandum Site Admin
Joined: 03 Dec 2004 Posts: 3274
|
Posted: Tue Mar 08, 2011 3:32 pm Post subject: |
|
|
| You need to escape once more for the unaction, so use %%%1 for that one. |
|
| Back to top |
|
 |
|