|
Virus Wanderer
Joined: 29 Jun 2002 Posts: 69 Location: USA
|
Posted: Fri Feb 21, 2003 6:41 pm
Multi Line Triggers |
Ok, if the mud outputs:
You fire LargeLaser at Alpha Lynx [zg] - BTH: 2 Roll: 9
You hit for 8 points of damage in the Right Leg
I want a var (di_zg_rl) to equal 8
If I get:
You fire LargeLaser at Alpha Spider [ra] - BTH: 2 Roll: 11
You hit for 8 points of damage in the Left Leg
I want a var (di_ra_ll) to equal 8
Now the problem I am having is that I dont know how to make a multi line trigger. I was thinknig to do 2 triggers liek the following:
#TR {^You fire %w at * ~[(%w)~] - BTH: %d Roll: %d$} {target_id = %1}
then a second trigger
#TR {^You hit for (%d) points of damage in the ({Right Leg|Left Leg|Left Arm|Right Arm})$} {#VAR di_{@target_id}_%1}
(Not sure if that was right syntaxed, but thats a moot point.)
The problem is that first of all it can be coded better. Second is that what if I shoot multiple targets and get the following output all at once....
You fire LargeLaser at Alpha Lynx [zg] - BTH: 2 Roll: 7
You hit for 8 points of damage in the Right Leg
You fire MediumLaser at Alpha Spider [ra] - BTH: 3 Roll: 5
You hit for 5 points of damage in the Left Leg
Alpha Spider [ra]'s Left Leg has been destroyed!
You fire MediumLaser at Alpha Lynx [zg] - BTH: 2 Roll: 3
You hit for 5 points of damage in the Left Arm
You fire MediumLaser at Alpha Spider [ra] - BTH: 3 Roll: 8
You hit for 5 points of damage in the Head
Then the trigger will work too slowly and the variables will get mixed up. Please help.
Richard Powell
Mux Alias: Virus
2796 Wizard Staff
64.89.10.1 port 2796
Rich@gigdev.com |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Fri Feb 21, 2003 7:16 pm |
#TR {You fire * at * ~[(%w)~] *$You hit for (%d) points of damage in the Right Leg} {#VAR di_%1_rl %2}
#TR {You fire * at * ~[(%w)~] *$You hit for (%d) points of damage in the Left Leg} {#VAR di_%1_ll %2}
LightBulb
Advanced Member |
|
|
|
Virus Wanderer
Joined: 29 Jun 2002 Posts: 69 Location: USA
|
Posted: Fri Feb 21, 2003 8:40 pm |
Didnt work
Richard Powell
Mux Alias: Virus
2796 Wizard Staff
64.89.10.1 port 2796
Rich@gigdev.com |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sat Feb 22, 2003 1:22 am |
Works when I test it.
LightBulb
Advanced Member |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Sat Feb 22, 2003 7:41 am |
See here for similar other scripts that track damage.
Ton Diening |
|
|
|
|
|