ForceGreet Mon Amour

Post » Thu Jun 21, 2012 11:40 pm

So, back to quest writing and once again, I can't get ForceGreet to work. I've tried it
  • in a scene
  • as a package on the actor's alias,
  • using the standard ForceGreet package
  • using my own package with a single FG (no movement) and a very large radius (which worked in the past)
  • using the Say procedure in place of ForceGreet.
None of them got so much as a whisper from my sinister villain. He will say his lines if you walk over and talk to him. But he's supposed to be gloating from a position of comparative safety, and we kind of lose that if the player gets into conventional dialogue range.

Last time I had this problem I solved it by launching a ScriptEvent quest and having the quest start a scene on startup, and launching the FG from there. That worked 100% reliably last time ... but then that was before the 1.6 update.

One complication here: The player isn't moving into an area to trigger this. The player activates something and the bad guy appears on a balcony and makes a speech. It's a small interior room and I've set the actor wait location and the player trigger location both to be anywhere withing 5000 units of the player. Which you'd expect to be ample.

Any ideas? Everytime I try and do anything more complicated than place dungeon tiles, this problem comes along and bites me on the backside. I'm fed up with it :(
User avatar
Quick Draw III
 
Posts: 3372
Joined: Sat Oct 20, 2007 6:27 am

Post » Thu Jun 21, 2012 3:36 pm

One complication here: The player isn't moving into an area to trigger this. The player activates something and the bad guy appears on a balcony and makes a speech. It's a small interior room and I've set the actor wait location and the player trigger location both to be anywhere withing 5000 units of the player. Which you'd expect to be ample.

It's surely the Forcegreet distance which should be PlayerRef in (none) radius 5000? (Although with such a large number they might be out of earshot.) The player trigger location should be where you want the player to be when the forcegreet happens, which surely is not 'within 5000 of anywhere in the world the player happens to be', and the NPC wait location should be where you want the NPC to be before the player has reached the trigger location, which I think is also not 'wherever the player is, radius 5000'.
User avatar
MatthewJontully
 
Posts: 3517
Joined: Thu Mar 08, 2007 9:33 am

Post » Thu Jun 21, 2012 6:57 pm

The player trigger location should be where you want the player to be when the forcegreet happens, which surely is not 'anywhere in the world the player happens to be', and the NPC wait location should be where you want the NPC to be before the player has reached the trigger location, which I think is also not 'wherever the player is, radius 5000'.

Well, that's the thing. The PC is already in the place where I want the speech to happen, and the bad guy teleports in onto his spot.

In essence it's like this: There's a button on the table. And when the player activates the button, a device starts up and a mechanism runs. At the end of that, the bad guy teleports in and gloats from far a balcony overhead.

I can make the villain appear at a different maker and walk to the spot. It might even look better that way since he's not really supposed to be teleporting. But the player is definitely where I want him to be already.

Which may of course be the problem, but I don't see a way around that.
User avatar
Jon O
 
Posts: 3270
Joined: Wed Nov 28, 2007 9:48 pm

Post » Thu Jun 21, 2012 6:55 pm

In essence it's like this: There's a button on the table. And when the player activates the button, a device starts up and a mechanism runs. At the end of that, the bad guy teleports in and gloats from far a balcony overhead.

I can make the villain appear at a different maker and walk to the spot. It might even look better that way since he's not really supposed to be teleporting. But the player is definitely where I want him to be already.

Which may of course be the problem, but I don't see a way around that.

But none of that makes those sensible settings for the NPC wait location and Trigger location on a package. How are you triggering the NPC's forcegreet package?
User avatar
Klaire
 
Posts: 3405
Joined: Wed Sep 27, 2006 7:56 am

Post » Fri Jun 22, 2012 4:43 am

But none of that makes those sensible settings for the NPC wait location and Trigger location on a package.

This is most likely true. And if anyone has settings that work when the speaker and the player are already in position, I'd be appreciative.

I did have this working early, where if the player would have been killed by bandits, the killer started a dialogue saying "Yield or Die". So it can be done. But replicating what I did there doesn't seem to be working this time.

How are you triggering the NPC's forcegreet package?

Well, I've been hoping that if they're already in a location that satifies the location reqirement, the FG will still trigger. I don't know another way to make it fire, sadly. As I say, it worked before...
User avatar
Elisabete Gaspar
 
Posts: 3558
Joined: Thu Aug 31, 2006 1:15 pm

Post » Thu Jun 21, 2012 12:28 pm

Well, I've been hoping that if they're already in a location that satifies the location reqirement, the FG will still trigger. I don't know another way to make it fire, sadly. As I say, it worked before...


Sorry, I didn't mean when the forcegreet procedure would trigger, but when the package itself would. You've put this package on an NPC or an alias. When will this package start running? That depends on what conditions you've put on it, not on whether the player has reached the trigger location. If you set up a trigger location that is always true, as you have, the NPC will attempt to forcegreet you as soon as their package starts[*]. (If you are not within forcegreet distance they will move towards you first.) So when is your NPC's package starting?

Another thing to check is that it is a package, not a package template. You can't add a package template directly to an Actor, but you can add one to an alias. It won't work in game, though.

[*] Edit: assuming you have set 'Player must be detected?' to false.
User avatar
Farrah Lee
 
Posts: 3488
Joined: Fri Aug 17, 2007 10:32 pm

Post » Fri Jun 22, 2012 4:31 am

Sorry, I didn't mean when the forcegreet procedure would trigger, but when the package itself would. You've put this package on an NPC or an alias. When will this package start running?

Ah, my apologies. I tried it without conditions at all, as well as making them depend on the quest. I figured I was only using this package in this one place, so it didn't really need conditions though.


That depends on what conditions you've put on it, not on whether the player has reached the trigger location. If you set up a trigger location that is always true, as you have, the NPC will attempt to forcegreet you as soon as their package starts[*]. (If you are not within forcegreet distance they will move towards you first.) So when is your NPC's package starting?

As soon as he arrives. Basically I keep him in a warehouse celll and then use moveto and an xmarker to make him appear. Once he's in place he should be both inside the minimum movement radius, so I'd expect him to talk right away. It's not the usual use of the package, I know, but it's what the scene calls for.

Another thing to check is that it is a package, not a package template. You can't add a package template directly to an Actor, but you can add one to an alias. It won't work in game, though.

I wasn't aware of that. It could very well be a template. I tend to make templates based on a comment in the wiki that says if you're making your own package, you might as well make a package template. I hadn't realised you still needed a package based on the template.

That might well explain why I'm having so much difficulty.

[*] Edit: assuming you have set 'Player must be detected?' to false.

I think I did, but I have been worry over that point myself. I'll have to check when I get home, Unfortunately that won't be for 48 hours or so yet :(

Still, that's two good leads. Thanks, I'll let you know how I get on :)
User avatar
Sheila Esmailka
 
Posts: 3404
Joined: Wed Aug 22, 2007 2:31 am

Post » Thu Jun 21, 2012 2:46 pm

I have an idea of what this might be, as I've had similar problems.
My problem tends to be that they are running another package from either themselves or an alias. Make sure you have a boolean global variable called shouldTalk or something that when shouldTalk==0 the other packages run, and the ForceGreet runs on shouldTalk==1.

EDIT: Just read the template thing. Yeah, I'll be thats the problem actually.
User avatar
Brιonα Renae
 
Posts: 3430
Joined: Mon Oct 22, 2007 3:10 am

Post » Thu Jun 21, 2012 8:33 pm

I just want to say "It WORKS!". Closely followed by "thankyouthankyouthankyouthankyouthankyouthankyouthankyouthankyouthankyouthankyou!"

Turns out when the wiki says

if you are going through the trouble of creating new behavior, you might as well make it a Template so you can reuse it later. Since creating a stand-alone package is identical to creating a template, except you don't mark it as a Template

That doesn't actually mean the template is identical in the sense of functioning as a package in its own right. Even though the CK will accept it as a package without complaint.

Lord, the hours that has cost me.

Thanks again, guys, I may get this svcker finished after all :)
User avatar
Pumpkin
 
Posts: 3440
Joined: Sun Jun 25, 2006 10:23 am


Return to V - Skyrim