Talk:GetSex - ActorBase
Revision as of 18:36, 4 May 2012 by imported>Fg109 (→Wrong return values?)
Wrong return values?
Hey there, I got some problems with this function. It always returns 0, regardless of what I use and what gender the target is. Example:
ActorBase targetBase = target.getbaseobject() as ActorBase
if(targetBase.getsex() == 0)
; do stuff
endif
I also tried this:
ActorBase targetBase = target.getbaseobject() as ActorBase
if(targetBase.getsex() != -1) && (targetBase.getSex() != 1)
; do stuff
endif
And as I expected it's the same result. "Target" is a valid actor, excluding this as a error source.
Can anyone confirm this? --Kahmul 18:46, 4 May 2012 (EDT)
- It worked fine with this script:
Scriptname fg109TestMEScript extends ActiveMagicEffect
Event OnEffectStart(Actor akTarget, Actor akCaster)
Debug.Notification(akTarget.GetActorBase().GetSex())
EndEvent
--Fg109 19:36, 4 May 2012 (EDT)