Divinity Banner
Previous Thread
Next Thread
Print Thread
Applying invisibility on kill #653263
22/06/19 09:47 PM
22/06/19 09:47 PM
Joined: Sep 2018
Posts: 7
M
Meldexun Offline OP
stranger
Meldexun  Offline OP
stranger
M

Joined: Sep 2018
Posts: 7
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.
Re: Applying invisibility on kill [Re: Meldexun] #653904
11/07/19 10:57 AM
11/07/19 10:57 AM
Joined: Mar 2016
Posts: 496
Belgium
T
Tinkerer Offline

addict
Tinkerer  Offline

addict
T

Joined: Mar 2016
Posts: 496
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.

Re: Applying invisibility on kill [Re: Tinkerer] #654034
14/07/19 07:20 PM
14/07/19 07:20 PM
Joined: Sep 2018
Posts: 7
M
Meldexun Offline OP
stranger
Meldexun  Offline OP
stranger
M

Joined: Sep 2018
Posts: 7
I had kind of the same thoughts. I will see what i can do in the future. Still thank you.


Moderated by  Dom_Larian, Larian_Koala 

Powered by UBB.threads™ PHP Forum Software 7.6.2