Variables

Error message

Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /var/www/pied-piper.ermarian.net/includes/common.inc).
AuthorTopic: Variables
Agent
Member # 27
Profile #0
Is there a variable for amount damage done and type of damage to a character?
Posts: 1233 | Registered: Wednesday, October 3 2001 07:00
...b10010b...
Member # 869
Profile Homepage #1
Nope. If you want to see how much damage a character has taken in a round, the best you can do is check its HP before and after and measure the difference.

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00
Agent
Member # 27
Profile #2
New question. Suppose I want a cutscene to trigger after a GROUP of enemies is dead, what variable could I use?

And does num_killed_in_town(which_town) even work?
Posts: 1233 | Registered: Wednesday, October 3 2001 07:00
Lifecrafter
Member # 6193
Profile Homepage #3
I would place all the enemies in a group, then have a check in the start_state of that town to see if the group is alive. Use num_chars_in_group(). If it returns 0 then start the cutscene.

I can't say I've ever used num_killed_in_town(), but I think I've heard others complaining that it is broken.

--------------------
Guaranteed to blow your mind.

Frostbite: Get It While It's...... Hot?
Posts: 900 | Registered: Monday, August 8 2005 07:00
Off With Their Heads
Member # 4045
Profile Homepage #4
According to the most recent bugs thread, that call always returns 0.

--------------------
Arancaytar: Every time you ask people to compare TM and Kel, you endanger the poor, fluffy kittens.
Smoo: Get ready to face the walls!
Ephesos: In conclusion, yarr.

Kelandon's Pink and Pretty Page!!: the authorized location for all things by me
The Archive of all released BoE scenarios ever
Posts: 7968 | Registered: Saturday, February 28 2004 08:00
Shaper
Member # 3442
Profile Homepage #5
In the creatures DEAD_STATE, use the call inc_flag(x,y,1). Then, in the scenario script's START_STATE, use IF calls to check that flag(x,y) equals the number of dead bad guys the party needs to have killed to trigger the cutscene, and then trigger it.

Hope that's clear...

--------------------
And when you want to Live
How do you start?
Where do you go?
Who do you need to know?

Posts: 2864 | Registered: Monday, September 8 2003 07:00