Larian Banner
Previous Thread
Next Thread
Print Thread
Joined: Sep 2018
M
stranger
OP Offline
stranger
M
Joined: Sep 2018
Hi there,
So i have created a character script which should apply invisibility for 1 round when killing an enemy. But the problem is that after a kill invisibility is applied but it is removed instantly again.
That is what i tried:
Code
EVENT OnKillEvent
ON
	OnDie(_, _, __Me, _)
ACTIONS
	CharacterApplyStatus(__Me, INVISIBLE, 1)

Any suggestions?

Last edited by Meldexun; 22/06/19 10:05 PM.
Joined: Mar 2016
Location: Belgium
T
addict
Offline
addict
T
Joined: Mar 2016
Location: Belgium
The INVISIBLE status gets removed by code from characters when they hit something. My guess is that this "did they hit something" check happens after applying the damage that triggers the Dying event for the hit character (which is what "OnDie" reacts to). The same holds for the Osiris CharacterKilledBy event. I think you'll have to cache the information about who killed the character, and then only apply the invisible status when the Osiris "CharacterDied" event arrives. I don't think there is an equivalent in behaviour script.

Joined: Sep 2018
M
stranger
OP Offline
stranger
M
Joined: Sep 2018
I had kind of the same thoughts. I will see what i can do in the future. Still thank you.


Moderated by  Larian_Koala 

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