Trying to attach an alias to the player for OnEnterBleedout

Post » Sat Nov 17, 2012 11:46 am

Ok so I am making the player vampire essential. Then when they get knocked down I want to do some stuff when the OnEnterBleedout is called, but I can't seem to get my messagebox to pop up.

I took the playervampirequest and on the quest alias tab I made a new alias called ImmortalPlayer and then on fill type to unique actor and then selected player. I added a script with the code:

Event OnEnterBleedout()  Debug.Messagebox("Player entered bleedout")endEvent

But I don't get this message coming up when the PC is knocked down.

I noticed under force into alias when filled it says none, but it has a drop down box with the player there, should I select the player?

DO I need to set this quest to update more frequently? I think it only updates every 12 hours, is that the problem?
User avatar
remi lasisi
 
Posts: 3307
Joined: Sun Jul 02, 2006 2:26 pm

Post » Sat Nov 17, 2012 11:03 am

Are you attaching it to the ALIAS?

Actor Script (of which EnterBleedOut is an event) extends ObjectReference ... not ReferenceAlias.

So I'm not sure it will fire if this is a script attached to an ALIAS (player or not)?

I THINK - but see below - that you would have to attach it to the Actor, not to an Alias??

(If I am right ... and usually I am not ... then you would have to have an OnUpdate Event attached to the ReferenceAlias and check for Bleedout using a GetRef conversion from the Alias)


(this type of thing is definately not my type of thing ... so I'm probably typing rubbish ... hopefully one of the less codingly-challenged forum-members has a better idea ;))
User avatar
sw1ss
 
Posts: 3461
Joined: Wed Nov 28, 2007 8:02 pm

Post » Fri Nov 16, 2012 11:12 pm

I had this working well with an alias, so I doubt that's the problem unless it's 1.6 breakage.

How about if you create a new quest and attach the player alias to that?

I take it your script does extend ReferenceAlias?
User avatar
(G-yen)
 
Posts: 3385
Joined: Thu Oct 11, 2007 11:10 pm

Post » Sat Nov 17, 2012 11:08 am

I had this working well with an alias, so I doubt that's the problem unless it's 1.6 breakage.

How about if you create a new quest and attach the player alias to that?

I take it your script does extend ReferenceAlias?
Yeah I will try that. I think its because the vampire quest only updates once every 12 hours. I have another small quest that updates frequently I will add the alias to it and hopefully it will get added to the player. Yes it does extend referencealias.

A nice little trick I use to figure things out is when I read on the wiki about a new function I've never used before I use agent ransack to browse all the scripts for the function I want to try, and see how bethesda used it. Seems to help immensely.
User avatar
Poetic Vice
 
Posts: 3440
Joined: Wed Oct 31, 2007 8:19 pm

Post » Sat Nov 17, 2012 3:12 am

Ok so I am making the player vampire essential. Then when they get knocked down I want to do some stuff when the OnEnterBleedout is called, but I can't seem to get my messagebox to pop up.

It's fine on an alias, as DocClox says. And you don't need to force the player into another alias. But when you enter bleedout and are essential, the game wants to show an animation - I'm not sure a messagebox would show at that point. Use Trace instead maybe.
User avatar
Nathan Risch
 
Posts: 3313
Joined: Sun Aug 05, 2007 10:15 pm


Return to V - Skyrim