Alias Not Being Set

Post » Thu Jun 21, 2012 7:26 am

I posted about this problem earlier but I have since learned the problem was something a little different. So I am going to post a more accurate question here.

I have a quest running where at the end an NPC ForceGreets the player and hands him a note.

Once the note is read the player is told to go to a location and sit in a particular chair.

I have it working as far as the player being given the note and the note's quest set to Stage 10.

But the Objective Displayed is not showing the alias correctly. Hence, the player cannot continue within the quest.

Rather than the name of the note which the alias points to, which would be "Read The Strange Note" what displays is "Read [...]"

I got the quest from a tut here ... https://www.youtube.com/watch?v=iustaHoHnEE

I have taken out the parts that deal with the Courier Quest from Stage 0 in the tut and put code in Stage 10 that gives the player the Note (which does work).

Here's some pics that might explain and a video showing what is happening:

http://lamplight.pcgamingnetwork.com/download/file.php?id=55&mode=view

http://lamplight.pcgamingnetwork.com/download/file.php?id=56&mode=view

http://lamplight.pcgamingnetwork.com/download/file.php?id=57&mode=view

http://lamplight.pcgamingnetwork.com/download/file.php?id=58&mode=view

http://lamplight.pcgamingnetwork.com/download/file.php?id=59&mode=view

And here's a video showing the problem...which is at the end of the video:

https://www.youtube.com/watch?v=SXj3tdWuGWM

(The reason the message says "Read The Strange Note" in the video is because I was testing the alias and had put in that text explicitly.)

Anyone have any ideas?

Do I need to post more information?

Thanks!
User avatar
SexyPimpAss
 
Posts: 3416
Joined: Wed Nov 15, 2006 9:24 am

Post » Thu Jun 21, 2012 7:51 pm

You haven't filled the alias with anything. You could use a fill type of Create reference to object, or you could create a reference to the note in the world, either in the CK and then choose the specific reference (which makes it persistent, so it usually best avoided), or with a PlaceAtMe command in a script followed by AliasNote.ForceRefTo() to fill your note alias.
User avatar
A Boy called Marilyn
 
Posts: 3391
Joined: Sat May 26, 2007 7:17 am

Post » Thu Jun 21, 2012 6:55 pm

I was wondering about that myself in the tutorial.

He mentioned that setting it to Optional allowed the alias to be set dynamically.....where the Note is placed at the player and then teleported to the Courier. But I didn't think that part would be needed since the Note has already been given to the player, so I deleted that part from the quest.

The lines in the tutorial are:

alias_Note.ForceRefTo(Game.GetPlayer().PlaceAtMe(Note))(WICourier as WICourierScript).addAliasToContainer(alias_Note)

Should I set the above to this?

alias_Note.ForceRefTo(Game.GetPlayer().PlaceAtMe(Note))game.getplayer().addAliasToContainer(alias_Note)

Would that be the correct syntax?
User avatar
Dustin Brown
 
Posts: 3307
Joined: Sun Sep 30, 2007 6:55 am

Post » Thu Jun 21, 2012 4:16 pm

How would I set it to Create Reference to Object?

I don't see "Player" in the "Create In" drop down....Do I make an alias to Player too?
User avatar
Mark Hepworth
 
Posts: 3490
Joined: Wed Jul 11, 2007 1:51 pm

Post » Thu Jun 21, 2012 9:35 pm

I just created an alias named Player and set the Note's alias to Create In Player

The quest was started and the Note was given to the player.

But the message is still "Read [....]" instead of "Read The Strange Note" and it didn't advance the quest.
User avatar
Ally Chimienti
 
Posts: 3409
Joined: Fri Jan 19, 2007 6:53 am

Post » Thu Jun 21, 2012 6:58 pm

Nevermind my last post

I just realized I need to make this work for the player instead of the courier:

alias_Note.ForceRefTo(Game.GetPlayer().PlaceAtMe(Note))(WICourier as WICourierScript).addAliasToContainer(alias_Note)
User avatar
(G-yen)
 
Posts: 3385
Joined: Thu Oct 11, 2007 11:10 pm

Post » Thu Jun 21, 2012 10:16 pm

Ok

I used this on Stage 10

alias_Note.ForceRefTo(Game.GetPlayer().PlaceAtMe(Note))game.getPlayer().AddItem(Note)SetObjectiveDisplayed(10)

And this time the alias was correctly displayed.

However, the quest didn't advance when the Note is read

Here's the script for the OnRead Event placed on the Note alias page:

Quest Property myQuest  Auto{Set the name of the quest}int Property myStageCompleted  Auto  {Set the stage that has just completed}int Property myStageToStart  Auto{Set the stage to start}event onRead()debug.messagebox("You read the note!")    myQuest.setStage(myStageToStart)endEvent

The messagebox doesn't display and the quest isn't advanced.

Anyone have an idea what to do?

Thanks!
User avatar
Breanna Van Dijk
 
Posts: 3384
Joined: Mon Mar 12, 2007 2:18 pm

Post » Thu Jun 21, 2012 10:54 am

@Ingenue

I overlooked where you say to use "Alias_Note.ForceRefTo()"

What's the correct syntax for that in my case?

I tried to use verbatim what you said but it throws an error out :/
User avatar
Mélida Brunet
 
Posts: 3440
Joined: Thu Mar 29, 2007 2:45 am

Post » Thu Jun 21, 2012 9:45 pm

I almost have this worked out I think

I have this on the Stage 10 of the quest:

alias_Note.ForceRefTo(Game.GetPlayer().PlaceAtMe(Note))game.getPlayer().AddItem(Note)SetObjectiveDisplayed(10)

Now...the first line places the Note at the player's feet but the second line places a different version of the note in the player's inventory.

When I look down at the ground I see the note and it says "Read the note" and if I activate the note on the ground it advances as it should to the next Stage.

So what I need is to figure out what the syntax is to get that Note from the ground into the Player's inventory.

I've tried all kinds of stuff through trial and error, searching the forums and wiki and I can not find one instance that shows how to get an object placed on the ground into the player's inventory.

Here's just a few things I've tried:

Alias_Note.ForceRefTo()
Player.addAliasToContainer(alias_Note)
Player.ForceRefTo(alias_Note)
game.getPlayer().AddItem(Note)
game.getPlayer().ForceRefTo(alias_Note)

and probably 50 other things

Can someone please let me in on the secret?

Thanks!
User avatar
Raymond J. Ramirez
 
Posts: 3390
Joined: Sun Oct 14, 2007 8:28 am

Post » Thu Jun 21, 2012 9:03 am

With the note created in the player alias...
Game.DisablePlayerControls()Alias_Note.GetReference().Activate(Game.GetPlayer())Game.EnablePlayerControls()
...will make the player read the note in their inventory.
User avatar
Luna Lovegood
 
Posts: 3325
Joined: Thu Sep 14, 2006 6:45 pm

Post » Thu Jun 21, 2012 11:42 pm

With the note created in the player alias...
Game.DisablePlayerControls()Alias_Note.GetReference().Activate(Game.GetPlayer())Game.EnablePlayerControls()
...will make the player read the note in their inventory.

Thanks for your reply Justin!

I have the object on the ground (the note) but I then need to have the note put into the player's inventory so he/she can then read it.

But I'll store away what you posted for future reference :)
User avatar
Elizabeth Lysons
 
Posts: 3474
Joined: Fri Feb 02, 2007 7:16 am

Post » Thu Jun 21, 2012 5:53 pm

No prob :) Skip the middleman (the ground) then by just putting the note in the player's inventory by switching 'at' back to 'in' for the created note alias. That snippet will make the player read it whether it's on the ground or in their inventory, but this way you wouldn't need to worry about getting it into the player's inventory. For any other inventory item than a BOOK form, Activate(Game.GetPlayer()) will make them pick it up.
User avatar
JD FROM HELL
 
Posts: 3473
Joined: Thu Aug 24, 2006 1:54 am

Post » Thu Jun 21, 2012 3:29 pm

If the Note is placed in the inventory that way then the ForceGreet would not be useful. The greeter is central to the whole mod though.

Right?
User avatar
Chavala
 
Posts: 3355
Joined: Sun Jun 25, 2006 5:28 am

Post » Thu Jun 21, 2012 11:03 am

No prob :smile: Skip the middleman (the ground) then by just putting the note in the player's inventory by switching 'at' back to 'in' for the created note alias. That snippet will make the player read it whether it's on the ground or in their inventory, but this way you wouldn't need to worry about getting it into the player's inventory. For any other inventory item than a BOOK form, Active.Game.GetPlayer() will make them pick it up.

Oh yea

This is using a fragment on the Stage page:

alias_Note.ForceRefTo(Game.GetPlayer().PlaceAtMe(Note))
User avatar
hannah sillery
 
Posts: 3354
Joined: Sun Nov 26, 2006 3:13 pm

Post » Thu Jun 21, 2012 6:33 pm

I tried your idea of placing the note "in" the player by making a Player ref and adding the note with "Create Reference To Object" and I put in a script "defaultSetStageOnPlayerAcquire" with the note in order to advance the Stage once the player receives the note.

But that didn't work either :confused:
User avatar
Angela
 
Posts: 3492
Joined: Mon Mar 05, 2007 8:33 am

Post » Thu Jun 21, 2012 4:24 pm

Maybe script the note to advance the quest with an OnRead event.
User avatar
Sami Blackburn
 
Posts: 3306
Joined: Tue Jun 20, 2006 7:56 am

Post » Thu Jun 21, 2012 8:39 am

Yea...I already have this in a script:

Scriptname LBGOnReadSetQuestStage extends ReferenceAliasQuest Property myQuest  Auto{Set the name of the quest}int Property myStageCompleted  Auto  {Set the stage that has just completed}int Property myStageToStart  Auto{Set the stage to start}event onRead()debug.messagebox("You read the note!")	;myQuest.SetObjectivedisplayed(myStageCompleted)	myQuest.setStage(myStageToStart)	;myQuest.SetObjectivedisplayed(myStageToStart)endEvent

I've commented things in and out as I've been trying to figure this out.

I have over 30 hours just on this problem :blush:

edit

the note isn't getting read because I haven't been able to get the aliased version put into the player inventory
User avatar
Eire Charlotta
 
Posts: 3394
Joined: Thu Nov 09, 2006 6:00 pm

Post » Thu Jun 21, 2012 6:02 pm

If you have just a minute here is a video that explains better :

https://www.youtube.com/watch?v=J-fzX9VrUEU
User avatar
Nichola Haynes
 
Posts: 3457
Joined: Tue Aug 01, 2006 4:54 pm

Post » Thu Jun 21, 2012 3:56 pm

Now...the first line places the Note at the player's feet but the second line places a different version of the note in the player's inventory.

And it's the one at the player's feet that fills the alias, so reading the other one will not run the script. Instead of calling AddItem(Note) you need to call AddItem.(Alias_Note.GetReference()).
User avatar
Shannon Marie Jones
 
Posts: 3391
Joined: Sun Nov 12, 2006 3:19 pm

Post » Thu Jun 21, 2012 8:04 pm

And it's the one at the player's feet that fills the alias, so reading the other one will not run the script. Instead of calling AddItem(Note) you need to call AddItem.(Alias_Note.GetReference()).

Thanks for the reply Ingenue :)

I still couldn't get that to work either.

I've decided to just drop the note idea and have the NPC verbally tell the player what is in the note. It's much easier that way
User avatar
Sharra Llenos
 
Posts: 3399
Joined: Wed Jan 17, 2007 1:09 pm


Return to V - Skyrim