Deal damage to party
Re: Deal damage to party
The same reason being hit by a fireball doesn't cause champion sounds for the injury.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
- Eleven Warrior
- Posts: 752
- Joined: Thu Apr 18, 2013 2:32 pm
- Location: Australia
Re: Deal damage to party
Also both Codes don't show a Screen effect like when the party dies from to much damage. In log 1 you see a big fiery screen when the party is dead yeah. I did it your way Thom, but Issacs had the Race sound which I needed. That's strange what Minmay said about the fireball, one would be screaming if they were hit by a ball of fire lol lol lolIsaac wrote:This is good too. I wonder why damageTile and :damage() do not cause champion sounds for the injury?THOM wrote:This would work also
Sometimes solutions are very obvious...Code: Select all
function Damage() party.party:getChampion(1):damage(5, "fire") party.party:getChampion(2):damage(5, "fire") party.party:getChampion(3):damage(5, "fire") party.party:getChampion(4):damage(5, "fire") end
Re: Deal damage to party
Some damage sources have screen effects. This includes most elemental damage and some of the "big" physical attacks (ogres, spike traps, etc.). There is no special screen effect associated with a game over, just the "GAME OVER" text. However if you get killed by damage that has a screen effect, then you will still see the screen effect if it kills the whole party; therefore, you see a "big fiery screen when the party is dead" if the party was just killed by a fireball.
If you want to play a screen effect with your damage then you need to either do so explicitly with PartyComponent:playScreenEffect(), or add a screen effect field to your TileDamagerComponent or MonsterAttackComponent.
And fireballs/frostbolts/ogre charges/spike traps/etc don't play champions' damage sounds because:
1. all four champions' damage sounds playing at once sounds awkward.
2. they already have screen effects or other dramatic effects, so the player does not need an audio cue to recognize that they have been damaged.
If you want to play a screen effect with your damage then you need to either do so explicitly with PartyComponent:playScreenEffect(), or add a screen effect field to your TileDamagerComponent or MonsterAttackComponent.
And fireballs/frostbolts/ogre charges/spike traps/etc don't play champions' damage sounds because:
1. all four champions' damage sounds playing at once sounds awkward.
2. they already have screen effects or other dramatic effects, so the player does not need an audio cue to recognize that they have been damaged.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
- Eleven Warrior
- Posts: 752
- Joined: Thu Apr 18, 2013 2:32 pm
- Location: Australia
Re: Deal damage to party
Hi all. Ok I tried to add the Screen Fx to the party t:playScreenEffect("damage_screen") but it's not working. It comes up with error: Attemp to call method ' playScreenEffect' (a nil Value).
What I need is when this lot take damage the damage screen appears no matter where the party is. Any help please. I know it's possible just not sure what Minmay meant
What I need is when this lot take damage the damage screen appears no matter where the party is. Any help please. I know it's possible just not sure what Minmay meant
Code: Select all
function PartyDie3a()
damageTile(party.level, party.x, party.y, party.facing, party.elevation, 512, "fire", 2000)
for x = 1,4 do
local t = party.party:getChampion(x)
playSound("damage_"..t:getRace().."_"..t:getSex())
t:playScreenEffect("damage_screen")
end
endRe: Deal damage to party
http://www.grimrock.net/modding/scripting-reference/
playScreenEffect is a method of PartyComponent, not Champion.
playScreenEffect is a method of PartyComponent, not Champion.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.