Using ForceGreet

Post » Thu Jun 21, 2012 7:27 am

Right before "NPC.StartCombat(Player)" in the combat script I put "Debug.MessageBox("Roggard About to start combat!")" and that messagebox does not pop up.

dangit
User avatar
Michelle davies
 
Posts: 3509
Joined: Wed Sep 27, 2006 3:59 am

Post » Thu Jun 21, 2012 4:25 pm

Maybe because he is still trying to speak. If you take the factions off and comment out the 'Say' line in the script, does the NPC start combat? You could maybe use another scene to deliver the line instead.

I've run out of ideas.

How would I use a scene to initiate combat?
User avatar
luis dejesus
 
Posts: 3451
Joined: Sun Aug 19, 2007 7:40 am

Post » Thu Jun 21, 2012 6:02 am

I think I have the scene all made up and everything pointing in the right directions.

But how do I set the property to point to the scene. I am sure that Topic Property won't do it:

Scriptname LBGQ30attackScript extends ReferenceAliasObjectReference Property GuardSpot  Auto Scene Property LongEnough  Auto Event OnUpdate()    Actor Player = Game.GetPlayer()    Actor NPC = GetActorReference()    if GuardSpot.GetDistance(Player) <= 800;Debug.MessageBox("About to start combat!")	    NPC.Say(LongEnough)	    Utility.Wait(10)Debug.MessageBox("Roggard About to start combat!")	    NPC.StartCombat(Player)    else	    ; TODO - if the player has gone far enough away, disable self, stop quest. Otherwise:	    RegisterForSingleUpdate(8)    endifendEvent

But using "Scene Property" gives an error.

Thanks again for your help :)
User avatar
Alexander Lee
 
Posts: 3481
Joined: Sun Nov 04, 2007 9:30 pm

Post » Thu Jun 21, 2012 12:40 pm

I think I have it so the attack scene should start but it doesn't actually start, I don't think:

Scriptname LBGQ30attackScript extends ReferenceAliasObjectReference Property GuardSpot  Auto Scene Property AttackScene AutoEvent OnUpdate()    Actor Player = Game.GetPlayer()    Actor NPC = GetActorReference()    if GuardSpot.GetDistance(Player) <= 800AttackScene.Start();Debug.MessageBox("About to start combat!")	   ; NPC.Say(LongEnough)	    Utility.Wait(10);Debug.MessageBox("Roggard About to start combat!")	    NPC.StartCombat(Player)    else	    ; TODO - if the player has gone far enough away, disable self, stop quest. Otherwise:	    RegisterForSingleUpdate(8)    endifendEvent

If I can't get this last line said I'll just work around it. But there must be something going on.

Please don't give up on me!
User avatar
Lovingly
 
Posts: 3414
Joined: Fri Sep 15, 2006 6:36 am

Post » Thu Jun 21, 2012 9:16 am

Please confirm ...

You do see this message box:
;Debug.MessageBox("About to start combat!")

You don't see this message box:
;Debug.MessageBox("Roggard About to start combat!")


If that is the case, then it is because your scene is never finishing. If that is the case, try making the last piece of dialogue for each NPC a Goodbye. If that doesn't work, try adding this:

AttackScene.Stop()

inbetween these two lines:

;Debug.MessageBox("Roggard About to start combat!")
NPC.StartCombat(Player)
User avatar
stevie trent
 
Posts: 3460
Joined: Thu Oct 11, 2007 3:33 pm

Post » Thu Jun 21, 2012 8:57 am

Please confirm ...

You do see this message box:
;Debug.MessageBox("About to start combat!")

You don't see this message box:
;Debug.MessageBox("Roggard About to start combat!")


If that is the case, then it is because your scene is never finishing. If that is the case, try making the last piece of dialogue for each NPC a Goodbye. If that doesn't work, try adding this:

AttackScene.Stop()

inbetween these two lines:

;Debug.MessageBox("Roggard About to start combat!")
NPC.StartCombat(Player)

I've tried to put "AttackScene.Start()" on the main NPC combat script but found it to be more reliable to put it in the ending fragment of the Edit Data (the button at the top of the Scenes) of the first scene ("yea. we don't need your kind around here!"). What I ended up doing is placing messagebox(es) at the beginning and ending Pap fragments of the new "AttackScene" ("I warned you!") and it displays that the scene IS being triggered and stopped correctly, but the voice isn't heard nor the subtitle. I do notice, however, that the character stops walking when that dialog is supposed to start but he doesn't say it....so I ticked the box "Can move while greeting", which is supposed to address the issue of a character moving when doing a line, but....the line still isn't said (and I've re-recorded the line multiple times with just the .wav file and using .fuz files).

So, what I am saying is that I have two separate scenes, one is being played and voiced and the next one is being played but not voiced.

Regarding Roggard (the main NPC who ForceGreets the player) not starting combat....

I have the messagebox "Debug.MessageBox("Roggard is about to start combat!")" placed just before "NPC.StartCombat(Player)" and the message IS displayed, but the character still runs and hides when the other characters start combat.

I've tried a lot of different things to get him to fight, even including removing his combat script, but he refuses to fight (I think maybe he went pacifist on me lol)
User avatar
Eve(G)
 
Posts: 3546
Joined: Tue Oct 23, 2007 11:45 am

Post » Thu Jun 21, 2012 7:58 pm

@h4vent

I mis-read the part in your post about using AttackScene.Stop()...I thought it said START. So my reply above may not make sense.

But, yes, I did try that line just before the line to initiate combat and he still runs away like a sissy.
User avatar
Karen anwyn Green
 
Posts: 3448
Joined: Thu Jun 15, 2006 4:26 pm

Post » Thu Jun 21, 2012 6:12 pm

Here's an image of the Data Page for the Attack Scene:

http://imgur.com/8uOFw

And here is the dialog page of the attack scene:

http://i.imgur.com/ddYnI.jpg
User avatar
dav
 
Posts: 3338
Joined: Mon Jul 30, 2007 3:46 pm

Post » Thu Jun 21, 2012 5:54 pm

Oh...and here is stage 30.

For those who don't know :smile:

http://imgur.com/AbKrO

You'll see the line... Alias_Roggard.GetActorReference().StartCombat(Alias_Player.GetActorReference()) ... that is suppose to make the main NPC, who first greets the player, go into combat mode.... but somehow he's been sissified.
User avatar
Maddy Paul
 
Posts: 3430
Joined: Wed Feb 14, 2007 4:20 pm

Post » Thu Jun 21, 2012 2:29 pm

Man I just found a major bug in this quest.

If the player actually does leave they attack anyway :/

Sheesh
User avatar
Lily
 
Posts: 3357
Joined: Mon Aug 28, 2006 10:32 am

Post » Thu Jun 21, 2012 6:54 pm

In case anyone is following this thread, here is a video showing what is happening:

https://www.youtube.com/watch?v=UrFGJEyFi2E
User avatar
SexyPimpAss
 
Posts: 3416
Joined: Wed Nov 15, 2006 9:24 am

Post » Thu Jun 21, 2012 3:40 pm

I'll try to have a look at it tonight or tomorrow, brew.

I don't think there's too much wrong, but doing things like this is always a bit of do-something, change-that, change-something-else, do-something ... Because you have so many variables to think about (like the bandits attacking if the player just walks away).

Eventually you'll have it all fixed up, it just takes quite some time to get it all closed off and just right

Like I say, I'll try and check through the stuff you have linked soon

Cheers :smile:
User avatar
Kelli Wolfe
 
Posts: 3440
Joined: Thu Aug 23, 2007 7:09 am

Post » Thu Jun 21, 2012 1:59 pm

I'll try to have a look at it tonight or tomorrow, brew.

I don't think there's too much wrong, but doing things like this is always a bit of do-something, change-that, change-something-else, do-something ... Because you have so many variables to think about (like the bandits attacking if the player just walks away).

Eventually you'll have it all fixed up, it just takes quite some time to get it all closed off and just right

Like I say, I'll try and check through the stuff you have linked soon

Cheers :smile:

I think, in the end, it will be discovered that I tweaked and twisted it up with too much unneeded stuff. My problem is....I don't know what's needed and what's not.

I really do appreciate the help from you guys.
User avatar
m Gardner
 
Posts: 3510
Joined: Sun Jun 03, 2007 8:08 pm

Post » Thu Jun 21, 2012 6:09 pm

I just started a new save game that starts from Riverwood.

When I get to Lamplight the quest doesn't start even though it is set to start when the game starts.

So I guess there's 4 bugs in this :down:
User avatar
Erika Ellsworth
 
Posts: 3333
Joined: Sat Jan 06, 2007 5:52 am

Post » Thu Jun 21, 2012 3:58 pm

Thanks to everyone for this helpful topic. It's very timely as this is what I'm currently working on.

I have a basic force greet working, but I want to see if you guys see any potential problems with what I've done. I didn't need anything extremely complex, so all I did was create a new AI package with the force greet template and my dialog topic set in the package data. Through a little experimenting I found 1000 trigger radius was about right for this open location. I set conditions so it would only be valid at stage 30 of my quest which is the stage they are enabled. The dialog sets the next stage to 35 and they default back to their regular guard package after the force greet. The dialog topic is set to say once so it won't fire again, and I'll use more conditions to refine their more complex AI packages later in my quest. For now, they are simply guarding near their editor locations.

I noticed the example plugin was more complex with scripting and such, but what I have seems to be working perfectly. Is there any problem using this overly simplistic approach? I have 3 other guards at other locations I need to do the same thing with. Basically, all that's happening is the player gets within their trigger radius, the guard asks them what they want, the player tells them he has important info for their boss, and they let him pass and go back to their routine. Once one guard allows the player access, none of them will run this particular forced greet again. Is this OK?
User avatar
Neil
 
Posts: 3357
Joined: Sat Jul 14, 2007 5:08 am

Post » Thu Jun 21, 2012 3:12 pm

@Balok

You can have it complex or simple it depends on the application and circumstances, ya know?

edit

I thought I read 10,000 radius in your post :/

What are you wanting your NPC to do and say?
User avatar
Sierra Ritsuka
 
Posts: 3506
Joined: Mon Dec 11, 2006 7:56 am

Previous

Return to V - Skyrim