Set wall damage to 0?

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
User avatar
meadwarrior
Journeyman
Posts: 91
Joined: Sat Dec 01, 2018 1:02 am

Set wall damage to 0?

Post by meadwarrior »

Hello!

Is there a way to set the 'walked against a wall' damage to 0?
Can it be turned off completely?
(Blasphemy!)

Thanks!
User avatar
Gambit37
Should eat more pies
Posts: 13718
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Set wall damage to 0?

Post by Gambit37 »

Yep, it's possible. Have a look in system.lua and take a copy of the sys_wall_hit function. You can delete everything in that function and nothing will happen when the party walks into the wall, eg:

Code: Select all

function sys_wall_hit(level, xc, yc, dir)
end
If you still want a sound to happen, but no damage, then leave the line for the sound in there. (You can change the value of base_wall_hit_sound to a different snd.soundname if you like.)

Code: Select all

function sys_wall_hit(level, xc, yc, dir)
  dsb_sound(base_wall_hit_sound)
end
User avatar
meadwarrior
Journeyman
Posts: 91
Joined: Sat Dec 01, 2018 1:02 am

Re: Set wall damage to 0?

Post by meadwarrior »

Thank you very much, Gambit!
That worked perfectly!
Post Reply