Safely overriding EVENT_TYPE_ATTACK_IMPACT and _DAMAGED
#1
Posté 01 janvier 2010 - 10:12
The problem being those two event are used a lot by individual object scripts and handed off to rules_core after they're done with it. If I override those two events, those object will not be able to catch the event, as I don't want rules_core to re-handle my event again.
The only solution I thought of is to look through all the scripts, and grab those object scripts into my event override script, and handle them on a case by case basis. This is really sub-optimal, so is there any way to have my event override only catch any event heading to rules_core? (meaning after those object scripts have handled it)
#2
Posté 02 janvier 2010 - 01:32
But may be 2 idea :
1) If you can accept that rules_core run before you script, you can override these 2 events and call HandleEvent at the very start of your script. Then do your stuff, and why not destroy what rules_core did.
2) Forget overriding these event for creatures that have a specific action on theses event. Maybe you can find a common properties of all these creatures. This is used in mod Auto loot I think.
But because you don't want what rules_core do, it seems to be a pretty deep change in the way damage are managed in the game. Don't fear to override rules_core in this case. Your "only solution" is not viable because you will have to parse all creature script EACH TIME BIOWARE RELEASE AN UPDATE !!!
#3
Posté 02 janvier 2010 - 06:30
#4
Posté 02 janvier 2010 - 08:26
I wouldn't want to touch Rules Core either. Just an idea. I'm about to override EVENT_TYPE_ATTACK_IMPACT myself.
Modifié par DodgeMoreLightning, 02 janvier 2010 - 08:35 .
#5
Posté 02 janvier 2010 - 11:43
DodgeMoreLightning wrote...
In the events 2da, there's a section listing all events and an entry that seems to say which script to call. Would having your script in its own file, with it listed as the script to go to in the 2da work? Rules Core would seemingly handle everything but the event you told to point to your script file. If you needed to pass through, you could possibly throw up a HandleEvent(sv,script) at the end like player core does (but since you presumably only are thrown the event you signed up for and you handle it, would it be necessary?).
I wouldn't want to touch Rules Core either. Just an idea. I'm about to override EVENT_TYPE_ATTACK_IMPACT myself.
He knows that. You will faced the same problem as him.





Retour en haut






