(fixed) Trigger glitch with monster projectiles

This forum is for the Lua scriptable clone of DM/CSB called Dungeon Strikes Back by Sophia. Use DSB to build your own highly customised games.

Moderator: Sophia

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
kaypy
Craftsman
Posts: 117
Joined: 19-Jan-14 06:11

(fixed) Trigger glitch with monster projectiles

Post by kaypy » 27-Sep-16 15:59

When a monster launches a projectile, the game triggers mechanisms as if it is an object on the ground at that tile.

The door here is set to opby thing-on-the-ground, but it will toggle when the dragon breathes:

Code: Select all

dsb_text2map(0, 8, 3, 100, 1, {
"11111111",
"00100001",
"00100000"} )
dsb_level_wallset(0, wallset.default)
dsb_text2map(1, 8, 3, 0, 1, {
"00000000",
"00100001",
"00111111"} )
dsb_level_wallset(1, wallset.default)
dsb_add_champion(1, "test", "port_mophus", "TEST", "", 9000, 9000, 1000, 800, 800, 400, 400, 400, 400, 400, {0,0,0,0,0}, {0,0,0,15,0}, {0,0,0,0,0}, {0,0,0,0,0})
ch_exvar = {
}
dsb_spawnburst_begin(21)
dsb_spawn(3, "doorframe", 0, 3, 0, 4)
dsb_spawn(20, "door_metal", 0, 3, 0, 4)
dsb_spawn(2, "pit", 0, 2, 1, 4)
dsb_spawn(1, "stairsdown", 0, 7, 1, 4)
dsb_spawn(4, "pad", 0, 2, 2, 4)
dsb_spawn(21, "dragon", 0, 2, 2, 4)
exvar = {
[4] = { target = 20,
msg = 100002,
opby_thing = true },
}
dsb_spawnburst_end()
EDITOR_FLAGS = 255
dsb_champion_toparty(0, 1)
dsb_party_place(0, 0, 0, 2)

User avatar
Sophia
Concise and Honest
Posts: 3951
Joined: 12-Sep-02 19:50
Location: Nowhere in particular
Contact:

Re: (fixed) Trigger glitch with monster projectiles

Post by Sophia » 27-Sep-16 18:37

The problem is that the engine is actually behaving correctly, according to the way the monster attack is coded. :shock:

The fireball is spawned "sitting on the ground" and is then launched, but the trigger gets set off as soon as the fireball is spawned. I'll fix this.

kaypy
Craftsman
Posts: 117
Joined: 19-Jan-14 06:11

Re: (fixed) Trigger glitch with monster projectiles

Post by kaypy » 28-Sep-16 15:26

Thanks

I have this mental image of a dragon spitting a fireball onto the ground, picking it up, maybe rubbing some dust off, and then throwing it at the party 8-)

Post Reply