Jump to content

Adding a note with players name and sex to a bandit


tonycubed2

Recommended Posts

note: the assassin has a script that runs upon death. It is not part of the quest where the lias is deffined. Maybe that is the problem and the requirement?

 

I think the script might need to extend ReferenceAlias not Actor. Sorry I didn't pick up on that before. Also, there needs to be a physical copy of the letter placed somewhere in the game world (eg. hidden in an inaccessible chest). You need to point the quest alias at that, not at the base form, iirc.

 

Scriptname sot_assaboss extends ReferenceAlias
  
Event OnDeath(Actor akKiller)   
       ObjectReference myLetter = letter.GetRef()   
       AddItem(myLetter, 1, true)   
endevent   
  
ReferenceAlias Property Letter  Auto  

 

Edit: if it doesn't work, then maybe the script might need to be put on a boss quest alias, not on the boss reference. in this case, maybe the alternative option to add the note as a death item on actor Darkbrother1 might work.

 

Edit2: you *might* have to place a disabled assassin boss in a hidden cell, then create a quest alias pointing to him, and then attach the script. Then your random spawning script would simply need to move the hidden boss to the player and enable it when required? If Gasti89 is lurking in the forum, maybe he can help out here, he's really good with this sort of quest stuff.

 

Edit3: Ok, here's something else try:

 

Scriptname sot_assaboss extends Actor
  
Event OnDeath(Actor akKiller)   
       AddItem(Letter, 1, true)   
endevent   
  
ObjectReference Property Letter Auto  

 

Just add the letter as an ordinary object (have the letter placed in game hidden somewhere like I suggested above). Place the script on the Boss (don't worry about him having an alias). Have the quest alias point to the letter reference, but don't worry about using the letter's alias in the actor's death script, since the quest should be able to "talk" to the letter via the quest alias regardless.

Edited by steve40
Link to comment
Share on other sites

steve40: I checked the Death Item option. Weird little choices there. Will not let you select custom items at all. Or notes or books. Geared towards dropping leveled items from random names. I got an emai where you said " The script needs to be put on the quest alias, not on the boss reference." . If so, then my whole setup is wrong and I would have to redo my encounters script as a quest with stages so I can use aliases deffined in the quest. Is this correct?
Link to comment
Share on other sites

I got an emai where you said " The script needs to be put on the quest alias, not on the boss reference." . If so, then my whole setup is wrong and I would have to redo my encounters script as a quest with stages so I can use aliases deffined in the quest. Is this correct?

 

We'd want to avoid having to do it that way if possible. Try the option that I suggested in "Edit3" of my last post. Otherwise, I'll drop a line to Gasti and see if he has any advice. Edit: I sent him a PM :thumbsup:

Edited by steve40
Link to comment
Share on other sites

I've never messed with these things so don't get angry if it doesn't work ;)

 

Let me guess something:

 

- We need the letter to be an alias in order to display the tags correctly

 

- But we also need an alias for the boss, in order to make the letter spawn in his inventory everytime the boss spawns

 

- If we put the letter in the world and point an alias to that specific reference, we gonna have only one instance of the letter moving when we call a "additem", so it may be removed from the player inventory when another boss spawns (a bit immersion-breaking)

 

- The boss alias must be filled dinamically after the spawn

 

SO

 

To avoid the use of the story manager (i believe it will handle this flawlessly, but i'm not confident with it yet) we gonna make a little workaround.

 

- Make a dummy quest with no stages (UNCHECK start game enabled). Create a stage and give a number different from 0 (for testing purposes, since in the console quest failed to start = stage 0) and mark it as "startup stage". Also mark "allow repeated stages" and UNMARK "do once".

 

- Make 2 aliases:

 

1) Boss alias. The type will be "Find matching reference". Check the box "in loaded area".

 

With this, when the quest starts, the story manager will look for a reference that matches conditions in the player's cell.

 

Now put a new condition on this alias, "HasKeyword". This keyword must be on the boss ActorBase. Create a new keyword and put it on him if necessary.

 

Check "Allow Dead".

 

2) Letter alias. "Create Reference to Object", select your letter. Use "In" and fill the last dropdown with the boss alias.

 

IMPORTANT: The boss alias MUST BE ABOVE the letter alias.

 

- Take the script that handles the boss spawns.

 

- Declare a quest property (that you'll fill with this new quest), and put "myQuest.Start()" somewhere in the script after the boss spawn. Maybe also put a Utility.Wait(2) before it, to give the time to completely finish the spawn. This to be sure that when aliases get filled there's a completely loaded boss in your cell.

 

- Script an OnDeath event on the boss that will call "myQuest.Stop()"

 

I can't test it and i really don't know if it may work correctly.

 

To test it, after the boss spawns you can console "Getstage yourquestID" and see if it return the number you put in the stage index.

 

Also, you can open the boss inventory via console to see if there's the letter.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...