Hi,
My module has an arena where the PC fights gladiators. I have it scripted when the PC or the opponent is at less than 20 hitpoints, they will fall down or sleep so that they don't die. At that point the arena boss announces the winner (the one left standing).
To do this, I have put a knockdown effect on the NPC's onDamaged script when the NPC reaches less than 20 hp and do a startconversation script for the arena boss to announce the PC as the winner.
In the NPC onCombatRoundEnd script I make the PC go to sleep when PC reaches less than 20 and announcing the opponent as the winner.
This works for the most part. The problem is if they both put each other below 20 before the combat round ends. For instance, the NPC puts the PC below 20 and then the PC puts the NPC below 20 before the combat round ends. This causes the boss to say that the NPC is the winner and then say the PC is the winner. It also messes up my follow up scripts.
It would be a lot easier to accomplish what I'm trying to do if the PC had an onDamaged script that I could assign the script to instead of waiting on a combat round to end or heartbeat. Does anyone know if there is a way to trigger a script the instant a PC is damaged?
Thanks!
Any way to launch an immediate script when PC is damaged?
Débuté par
Fallyn Rayne
, avril 22 2011 09:56
#1
Posté 22 avril 2011 - 09:56
#2
Posté 22 avril 2011 - 10:03
Yes, in brief: on hit cast spell on armor. If PC has no armor you must create a new that looks like no armor...
#3
Posté 23 avril 2011 - 12:22
All PC events are run in a script called "default" (noexistant, but look at the default character bics) - check out OHS by OldMansBeard for more information about how player events are implemented through this script.
#4
Posté 23 avril 2011 - 05:19
ShaDoOoW wrote...
Yes, in brief: on hit cast spell on armor. If PC has no armor you must create a new that looks like no armor...
Couldn't this go on the PC Properties Skin? (X3_SKIN_)





Retour en haut






