|
nazradin Apprentice
Joined: 23 Mar 2003 Posts: 114 Location: New Zealand
|
Posted: Sun May 16, 2004 11:45 am
trigger question |
I am having trouble with a stancing trigger
You attempt to kick a bog wight!
Roundtime changed to 2 seconds.
MB: 241 vs MB: 102 = 139 -- Gain advantage!
Quick move! Gained great position.
THT 63, d100 roll: 97, modified: 236
and hits for 57 points of damage!
... +10 extra hits. Flying kick to body knocks foe down.
Foe is stunned and loses parry.
Roundtime: 4 sec.
trigger is
#BUTTON 17 {volnkick} {
#if (@currentstance > 0) {stance offensive}
kick @thatone @monster
#TEMP {Round* (%d) sec} {
#ALA RT +%%1 {
stance defensive
look
}
}
the roundtime trigger can be Roundtime or Round time
and i dont always use haste so can be
Roundtime changed to (%d) seconds.
Roundtime (%d) sec
any ideas it looks right to me
nazradin |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sun May 16, 2004 8:18 pm |
Count braces {}. You open more than you close.
|
|
|
|
nazradin Apprentice
Joined: 23 Mar 2003 Posts: 114 Location: New Zealand
|
Posted: Mon May 17, 2004 3:45 pm |
quote: Originally posted by LightBulb
Count braces {}. You open more than you close.
sorry that was a cut and paste miss, there is another braces there copy missed it. so thats not the error
Naz |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Mon May 17, 2004 5:18 pm |
The button works with the missing brace added. What is the problem?
That is, what is happening which you think shouldn't happen,
or not happening which you think should happen,
or happening different from what you want.
You probably think you already said, but I can't find it. I also can't find the pattern of your trigger or figure out why you would want this #BUTTON command in a trigger.
At a guess, you just want to change the alarm time.
#TR {Roundtime: (%d) sec.} {#CALL %alarm( RT, %eval( %1 * 1000))} |
|
|
|
nazradin Apprentice
Joined: 23 Mar 2003 Posts: 114 Location: New Zealand
|
Posted: Tue May 18, 2004 7:33 am |
quote: Originally posted by LightBulb
The button works with the missing brace added. What is the problem?
That is, what is happening which you think shouldn't happen,
or not happening which you think should happen,
or happening different from what you want.
You probably think you already said, but I can't find it. I also can't find the pattern of your trigger or figure out why you would want this #BUTTON command in a trigger.
At a guess, you just want to change the alarm time.
#TR {Roundtime: (%d) sec.} {#CALL %alarm( RT, %eval( %1 * 1000))}
sorry i did indeed think that i had posted what my exact problem is rather than look at this and work it out
a: the script is from a button is the only reason #button is there I should have not included it in 1st case as it is irrelevant.
relevant portion being
#if (@currentstance > 0) {stance offensive}
kill @thatone @monster
#gag stam
#TEMP {Round*time: (%d) sec} {
#ALA RT +%%1 {
stance defensive
look
}
}
b: the part i am having trouble with is the temp trigger does not seem to be firing as after attacking "kill @thatone @monster", It does not stance nor attempt to as when i remove the #alarm and change trigger to
#TEMP {Round*time: (%d) sec} {
stance defensive
look
}
> kill first lion
You swing a drakar-spiked eonake morning star at a plains lion!
AS: +97 vs DS: +60 with AvD: +34 + d100 roll: +100 = +171 Advantage 71
... and hit for 28 points of damage!
Blow leaves an imprint on the plains lion's chest!
crush rank 1 chest damage 5
Roundtime: 5 sec.
stance defensive
look
A plains lion roars loudly as he stands up!
>
...wait 2 seconds.
so yes i do think that the alarm is the problem but i am not sure why
RT is definded in another class
#CLASS {Gauges|Roundtime}
#TRIGGER "rtTrig" {Q} {#VAR roundTime {%gsl( Q)}} "" {gsl}
#COND {q} {
#VAR worldtime {%gsl( q)}
#IF (%eval( @roundtime-@worldtime)>0) {
#VAR rt {%eval( @roundtime-@worldtime)}
#VAR maxrt {@rt}
#T+ rtAlarm
#TS (@rt+1)
}
} {gsl}
#ALARM "rtAlarm" {-1} {
#add rt (-1)
#if (@rt<1) {#T- rtAlarm}
} "" {disable}
#class 0
Nazradin |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Tue May 18, 2004 12:32 pm |
I've got no problem with the alarm. Here's my test:
#ALIAS test {#TEMP {Round*time: (%d) sec} {#ALA RT +%%1 {stance defensive;look}}}
test
#SH {Rount time: 5 sec}
After five seconds I see:
stance defensive
look
Try testing that yourself and see if it works. Also, when running the whole script, you can check the settings to see if the temp trigger is being created and if the alarm is created correctly after the temp trigger fires. That way you can determine if it is the alarm causing problems or not. |
|
|
|
nazradin Apprentice
Joined: 23 Mar 2003 Posts: 114 Location: New Zealand
|
Posted: Tue May 18, 2004 2:07 pm |
quote: Originally posted by Kjata
I've got no problem with the alarm. Here's my test:
#ALIAS test {#TEMP {Round*time: (%d) sec} {#ALA RT +%%1 {stance defensive;look}}}
test
#SH {Rount time: 5 sec}
After five seconds I see:
stance defensive
look
Try testing that yourself and see if it works. Also, when running the whole script, you can check the settings to see if the temp trigger is being created and if the alarm is created correctly after the temp trigger fires. That way you can determine if it is the alarm causing problems or not.
seems it is the double % in the alarm, #ALA RT +%%1 , is this bacause it use to be part of an alias that i changed to a button?
thanks naz |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Tue May 18, 2004 7:27 pm |
Yes, that explains it. Aliases use %1 and buttons don't. The double % is to defer evaluation. Since you want %1 evaluated in the #TEMP trigger, the alias needs the evaluation deferred but the button doesn't.
|
|
|
|
|
|