Перейти к содержимому

Фотография

Destroying a placeable during combat


  • Пожалуйста, авторизуйтесь, чтобы ответить
14 ответов в этой теме

#1
rjshae

rjshae
  • Members
  • 4 477 сообщений

In a cut scene I've got a set of placeables that I'm destroying then replacing with broken versions. However, each placeable lingers for a short time after being destroyed before fading away. Is there a blueprint setting or a script command I can use to make them vanish right away?



#2
kevL

kevL
  • Members
  • 4 052 сообщений
not sure, but you could try tricks like
- setting its x/y/z really small
- switching its appearance to none
- (etc)

just before the destroy command
  • Это нравится: rjshae

#3
rjshae

rjshae
  • Members
  • 4 477 сообщений

Thanks KevL.

 

Now I'm trying to get a grey dwarf to do a victory animation at the end while holding a weapon, but it's not happening for some reason. I guess some animations don't work when a weapon is equipped?



#4
4760

4760
  • Members
  • 1 203 сообщений
You may also hide the transition with a visual effect ( wood explosion, dust cloud). Or use an animation from the idle (unbroken) state to the openidle (destroyed) state (that's how I did it for the combat dummy and a few other statues, but of course you'll need 3ds max and Expotron if the animation doesn't exist already).

#5
4760

4760
  • Members
  • 1 203 сообщений

I guess some animations don't work when a weapon is equipped?


Yes, when there's the combat stance (_1hs_, _D2h_ for example), but when it's a standard animation, it should work even when there's a weapon in hand. I don't know for "victory", but for sure "point" doesn't care if you're empty-handed or not. Are you sure there's no typo in the script? Does "point" work?

#6
rjshae

rjshae
  • Members
  • 4 477 сообщений

Ah, found it. I was setting the wrong 'new' tag when I created the first dwarf. The second animated just fine. *sigh* Thank you.



#7
kevL

kevL
  • Members
  • 4 052 сообщений
cat4_kittenpounce.jpg

#8
rjshae

rjshae
  • Members
  • 4 477 сообщений

Okay, this cut scene is supposed to be re-entrant. That is, each time the trigger condition occurs it should replay itself. On the second run it does call the routine that executes the FireAndForgetConversation call (from gin_cutscene). However, the associated conversation doesn't run on the second try. I confirmed that the conversation tree is set to 'Always' in the Node tab, and there is no Condition script that would prevent it from running. It just isn't working. I'm wondering if there is something I'm supposed to do to turn things back off at the end of the cut scene?

void main()
{
	object oPC = GetEnteringObject();
	if(GetIsPC(oPC)) {
		struct CutsceneInfo stCI;
		int bCutsceneCondition = TRUE;
		string sSpeakerTag = "cut10_ip_conversation"; // Ipoint Speaker
		string sDialogName = "cut10_start_conv";      // Cutscene conversation
		
		// Initialize cutscene information
		stCI = ResetCutsceneInfo( stCI );
		stCI = SetupCutsceneInfo( stCI, sSpeakerTag, oPC, sDialogName, bCutsceneCondition );
		
		BlackScreen(oPC);
		SetScriptHidden(oPC, TRUE, FALSE);
		FireAndForgetConversation(stCI.oSpeaker, oPC, stCI.sDialog);
		DelayCommand( 82.0, SetScriptHidden(oPC, FALSE) );
		DelayCommand( 82.0, ResetTelescope(oPC) );
	}
}


#9
rjshae

rjshae
  • Members
  • 4 477 сообщений

Ah, I think I've got it. The SetupCutsceneInfo call adds a local variable to check when it has already played. Hmm, guess I'll need to reset that.



#10
kevL

kevL
  • Members
  • 4 052 сообщений
y, that's what i noticed Rj

Are you really intent on using the CutsceneInfo struct? I think the only benefit it has, in itself, is that it allows cutscenes to stack - but if there's no danger of that then it's just a complication.

some of the functions in 'ginc_cutscene' are still useful tho

#11
rjshae

rjshae
  • Members
  • 4 477 сообщений

y, that's what i noticed Rj

Are you really intent on using the CutsceneInfo struct? I think the only benefit it has, in itself, is that it allows cutscenes to stack - but if there's no danger of that then it's just a complication.

some of the functions in 'ginc_cutscene' are still useful tho

 

I've used the struct several times without a problem; this time I just had an issue because the cutscene resets itself.



#12
kevL

kevL
  • Members
  • 4 052 сообщений
k

#13
andysks

andysks
  • Members
  • 1 642 сообщений

I didn't even know we can use structs in nwnscript. Interesting...



#14
kevL

kevL
  • Members
  • 4 052 сообщений
vars only. No methods, no 'oops'

#15
andysks

andysks
  • Members
  • 1 642 сообщений

Pascal style :).