Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
#639415 22/12/17 08:47 PM
Joined: Jul 2014
Tiqon Offline OP
member
OP Offline
member
Joined: Jul 2014
I added a simple spike trap (PUZ_Trap_SpikedFloor_A).

When it activates it does HUGE amount of damage, like almost a 1000.

How do I make that more lvl depended?

It would be nice, that the trap did not just outright kill a character.

Tiqon #639422 22/12/17 11:44 PM
Joined: Sep 2017
veteran
Offline
veteran
Joined: Sep 2017
It'd have to be done through stats somewhere, I assume.

How about a set percentage of their health?

Like, in this case dealing about 1/5 of their HP...

IF
SomethingThatRecognizesTheTrapIsSprung
AND
DB_IsPlayer(_Player)
AND
CharacterGetHitpointsPercentage(_Player, _HPPercentage)
AND
IntegerDivide(_HPPercentage, 5, _NewPercentage)
THEN
ApplyDamage(_Player, _NewPercentage, "Chaos");


Tiqon #639456 23/12/17 10:20 AM
Joined: Jul 2014
Tiqon Offline OP
member
OP Offline
member
Joined: Jul 2014
Thanks, but I dont want to mess anything up with my poor knowledge about scripting laugh. I just want to make maps wink.

I would have assumed that it was a property or at least inside the scripts already attached to the trap. Like that CasterLevel, that is -1 atm. Changing that did nothing.

I just thought I missed something obvious. I will just state in the description its there and you can easily remove it. My initial though was placing a trapwire and if someone crossed a bell would ring. No bells in the enigine and while I could just place an area trigger to trigger a sound, I wanted the players to have a chance to find it and disarm it. That I did not figure out how to do.

Anyhow, it was just a thought and is not a necessity for the map. I already used way to much time on this map laugh (but still learning stuff and getting faster every time ;)).

Joined: Nov 2017
E
journeyman
Offline
journeyman
E
Joined: Nov 2017
Originally Posted by The Composer

ApplyDamage(_Player, _NewPercentage, "Chaos");

Are you absolutely sure that ApplyDamage accepts percentage? Last I checked STORY scripts they quite often have values over 100 and once even 66666 (probably for those crucified guys).

All of it makes me think that it's the absolute value here not percentage


Moderated by  Larian_KVN 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.5