Thrown object impact DSA?
Moderator: Zyx
Forum rules
Please read the Forum rules and policies before posting.
Please read the Forum rules and policies before posting.
Thrown object impact DSA?
Is there some way to get a DSA to fire when an object you've thrown hits something? I tried looking at the filter documentation but couldn't find a suitable one.
Specifically I'd like to implement a new type of bomb potion.
I can see one way of implementing that, but it's so much work for both me and the DSA that I'm hoping there would be an easy way that I've just overlooked (when the cursor filter says that you've thrown the bomb, start scanning each tick the horizontal/vertical line for signs of the bomb appearing on a tile or in monster's possession... Please tell me there is that easier way I'm hoping for...)
Specifically I'd like to implement a new type of bomb potion.
I can see one way of implementing that, but it's so much work for both me and the DSA that I'm hoping there would be an easy way that I've just overlooked (when the cursor filter says that you've thrown the bomb, start scanning each tick the horizontal/vertical line for signs of the bomb appearing on a tile or in monster's possession... Please tell me there is that easier way I'm hoping for...)
Toni Ylisirniö
Author of Grave of King Millias, Return of Chaos, and DM2 dungeons.
Author of Grave of King Millias, Return of Chaos, and DM2 dungeons.
- Paul Stevens
- CSBwin Guru
- Posts: 4319
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
It is rather complex. Lots of ways
to add a bug to the code if we
attempt anything complicated.
There is a very particular place
in the code where it is determined
that a Missile has contacted a
Monster. I could certainly call
a filter DSA when this occurs.
The filter would be allowed to
abort any further processing.
If the operation were aborted then
it would be as if the missile passed
through the monster (like a dagger
through a Non-material monster).
The DSA would have to determine
if the missile (and the object contained
within the missile) are somehow special.
to add a bug to the code if we
attempt anything complicated.
There is a very particular place
in the code where it is determined
that a Missile has contacted a
Monster. I could certainly call
a filter DSA when this occurs.
The filter would be allowed to
abort any further processing.
If the operation were aborted then
it would be as if the missile passed
through the monster (like a dagger
through a Non-material monster).
The DSA would have to determine
if the missile (and the object contained
within the missile) are somehow special.
- Paul Stevens
- CSBwin Guru
- Posts: 4319
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
I've had a play with it now, and it seems to fit the bill exactly (well, after it's been extended to all encounters, right now my bomb explodes only on impact with the monsters, but that part is working very nicely already )
Toni Ylisirniö
Author of Grave of King Millias, Return of Chaos, and DM2 dungeons.
Author of Grave of King Millias, Return of Chaos, and DM2 dungeons.
- Paul Stevens
- CSBwin Guru
- Posts: 4319
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
http://viila.lethalcode.net/~tylisirn/d ... Filter.rar
Here's a simplified version and the playfile.
Basically, what happens at the screamer is what should happen in all test cases marked so.
Of course, I'm not averse to having a trigger even in the cases where the ful bomb is non-interactive. (ie, flying through an illusionary wall, or flying through the holes in the door.) That would open even more possibilities. (Bottled Zo-spell? ) However, this is a minimal set that would be very useful.
Here's a simplified version and the playfile.
Basically, what happens at the screamer is what should happen in all test cases marked so.
Of course, I'm not averse to having a trigger even in the cases where the ful bomb is non-interactive. (ie, flying through an illusionary wall, or flying through the holes in the door.) That would open even more possibilities. (Bottled Zo-spell? ) However, this is a minimal set that would be very useful.
Toni Ylisirniö
Author of Grave of King Millias, Return of Chaos, and DM2 dungeons.
Author of Grave of King Millias, Return of Chaos, and DM2 dungeons.
- Paul Stevens
- CSBwin Guru
- Posts: 4319
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
- Paul Stevens
- CSBwin Guru
- Posts: 4319
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
It appears that we've managed to do just that.Paul Stevens wrote:Lots of ways
to add a bug to the code if we
attempt anything complicated.
I was testing in a dungeon without any DSAs for damages done by thrown and shot objects, and it seems we've rendered monsters invulnerable to projectiles...
Both Screamers and Mummies suffered no damage from arrows from any sort of bow, rocks, daggers or throwing stars with 10.071. Using an older exe (10.006), they lost HPs as expected.
Toni Ylisirniö
Author of Grave of King Millias, Return of Chaos, and DM2 dungeons.
Author of Grave of King Millias, Return of Chaos, and DM2 dungeons.
- Paul Stevens
- CSBwin Guru
- Posts: 4319
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
- Paul Stevens
- CSBwin Guru
- Posts: 4319
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA