Cutscene: Choreograph a battle
#26
Posté 28 juin 2011 - 03:55
I still don't know about the SetCombatOverrides(), since as I stated it appears to be more geared towards damage in an actual battle v.s. attack animations.
So I'm either going to have to figure out some kind of work around, or perhaps I should give it up as an overly ambitious goal.
#27
Posté 28 juin 2011 - 12:31
Pompeii69 wrote...
In my tests, I had the speaker attack the listener, but as far as I know, there doesn't seem to be a way to interrupt it to continue with the scripting out of the scene. Dialog will continue, but they're still duking it out. I'll look into this custom spell solution and see what it offers.
Since my group will be trading jibes with the enemy during the course of the battle, I want to maintain as much control over the battle as I can. (Remember, this isn't a playable mod, but a machinima attempt) Also stopping it at variousd points, having the enemy flee with the group chasing, resuming, with the resulting culmination in the battle itself. You know, like a Spider-Man and Doc Ock battle.... LOL
You might be able to have an IPointSpeaker be the owner of the conversation. This will allow you to do stuff like call a ClearAllActions(TRUE) on the attacker which will clear it's combat state (make it stop attacking). The advantage of using the IPoint is that you then have complete control over the NPCs and nothing will cause the conversation itself to be interrupted.
#28
Posté 28 juin 2011 - 01:11
#29
Posté 28 juin 2011 - 01:35
Pompeii69 wrote...
However, there doesn;t appear to be basic attack animation available, so staging or choreographing an entire fight sequence doesn;t seem likely. Unless there's something I'm missing (more than possible)
I realize that you have taken a different route at this point, but for future reference, you are not limited to the animations enumerated in the list that you gave. You can, in fact, play any animation that occurs in the game using the PlayCustomAnimation function. It can take a lot of trial and error to get the timing right in a scripted sequence, but good to know that you are not limited to those predefined constants.
#30
Posté 28 juin 2011 - 02:17
JasonNH wrote...
Pompeii69 wrote...
However, there doesn;t appear to be basic attack animation available, so staging or choreographing an entire fight sequence doesn;t seem likely. Unless there's something I'm missing (more than possible)
I realize that you have taken a different route at this point, but for future reference, you are not limited to the animations enumerated in the list that you gave. You can, in fact, play any animation that occurs in the game using the PlayCustomAnimation function. It can take a lot of trial and error to get the timing right in a scripted sequence, but good to know that you are not limited to those predefined constants.
I can live with trial and error on the timing, since a cutscene (or machinima in my case) is all about timing anyway. During a conversation, I've been using the built in event actions (ga*). Am I correct in assuming I'm not limited to those, that I could write a script that would also be callable from within the conversation screen?
I clicked the link for PlayCustomAnimation, but is there a master list somewhere of the animations themselves?
Modifié par Pompeii69, 28 juin 2011 - 02:20 .
#31
Posté 28 juin 2011 - 02:21
_Knightmare_ wrote...
Pompeii69 wrote...
In my tests, I had the speaker attack the listener, but as far as I know, there doesn't seem to be a way to interrupt it to continue with the scripting out of the scene. Dialog will continue, but they're still duking it out. I'll look into this custom spell solution and see what it offers.
Since my group will be trading jibes with the enemy during the course of the battle, I want to maintain as much control over the battle as I can. (Remember, this isn't a playable mod, but a machinima attempt) Also stopping it at variousd points, having the enemy flee with the group chasing, resuming, with the resulting culmination in the battle itself. You know, like a Spider-Man and Doc Ock battle.... LOL
You might be able to have an IPointSpeaker be the owner of the conversation. This will allow you to do stuff like call a ClearAllActions(TRUE) on the attacker which will clear it's combat state (make it stop attacking). The advantage of using the IPoint is that you then have complete control over the NPCs and nothing will cause the conversation itself to be interrupted.
I've never heard of an IPointSpeaker, I'll do some research. Thanx.
#32
Posté 28 juin 2011 - 03:26
The IPointSpeaker is listed under the Placeables -> MISC blueprint tab and is specifically meant to be used to fire off/hold conversations.
#33
Posté 28 juin 2011 - 03:46
Pompeii69 wrote...
I clicked the link for PlayCustomAnimation, but is there a master list somewhere of the animations themselves?
Yes, at bottom of said page where it says PlayCustomAnimation: List of animations
#34
Posté 29 juin 2011 - 02:36
So I have a character casting a spell, fireball, butall that happens is the character goes through the motions, but the actual fireball doesn;t fire. I assuming I'll have to script in the VFX of the fireball? Will I also have to script the impact?
#35
Posté 29 juin 2011 - 04:43
Pompeii69 wrote...
One more question, hopefully I'll be running out of questions soon...
So I have a character casting a spell, fireball, butall that happens is the character goes through the motions, but the actual fireball doesn;t fire. I assuming I'll have to script in the VFX of the fireball? Will I also have to script the impact?
Ah, for that, take a look at CastFakeSpellAtObject(). It will make your life easier.
#36
Posté 29 juin 2011 - 05:14
JasonNH wrote...
Pompeii69 wrote...
One more question, hopefully I'll be running out of questions soon...
So I have a character casting a spell, fireball, butall that happens is the character goes through the motions, but the actual fireball doesn;t fire. I assuming I'll have to script in the VFX of the fireball? Will I also have to script the impact?
Ah, for that, take a look at CastFakeSpellAtObject(). It will make your life easier.
Will do... Thanx!
#37
Posté 30 juin 2011 - 01:52
JasonNH wrote...
Pompeii69 wrote...
However, there doesn;t appear to be basic attack animation available, so staging or choreographing an entire fight sequence doesn;t seem likely. Unless there's something I'm missing (more than possible)
I realize that you have taken a different route at this point, but for future reference, you are not limited to the animations enumerated in the list that you gave. You can, in fact, play any animation that occurs in the game using the PlayCustomAnimation function. It can take a lot of trial and error to get the timing right in a scripted sequence, but good to know that you are not limited to those predefined constants.
I'm curious... is there a difference between ga_play_custom_animation and PlayCustomAnimation()? I'm asking because it says in the description for ga_play_custom_animation: Conversation script wrapper for PlayCustomAnimation() command. I used the ga_play_custom_animation, and it did indeed play the *1attack01 animation as the PlayCustomAnimation() was said to.
Where this really is making me curious though, was in a later response, when it came to casting a FireBall, where the fireball actually fired, to use CastFakeSpellAtObject, and thinking this too (BTW, couldn't find that but did find ActionCastFakeSpellAtObject) was the same, tried using ga_cast_fake_spell_at_object, but it didn;t seem to work at all. Are they not the same like the ga_play_custom_animation and PlayCustomAnimation() are the same?
Assuming they're not the same, and I do have to use the actual ActionCastFakeSpellAtObject, any ideas where I can find some examples of it's call. I know the code snippet has a description of the parameters, but studying some working examples would help me a bit (I kinda learn better by example as opposed to reading descriptions...) I assume I'm gonna need an object that defines the speaker (or who I want to cast the spell), some kind of location object I should be able to get somehow based on the location of the waypoint I'm targeting, etc...
Modifié par Pompeii69, 30 juin 2011 - 01:53 .
#38
Posté 30 juin 2011 - 02:46
Pompeii69 wrote...
I'm curious... is there a difference between ga_play_custom_animation and PlayCustomAnimation()? I'm asking because it says in the description for ga_play_custom_animation: Conversation script wrapper for PlayCustomAnimation() command. I used the ga_play_custom_animation, and it did indeed play the *1attack01 animation as the PlayCustomAnimation() was said to.
The ga_play_custom_animation script ultimately calls the PlayCustomAnimation() function and adds an optional delay command before assigning the action. Any actions that you assign to a command queue have to return void,so the ga script puts that wrapper around the function for you and embeds it inside of a DelayCommand() if you specify a non-zero value for the delay.
Where this really is making me curious though, was in a later response, when it came to casting a FireBall, where the fireball actually fired, to use CastFakeSpellAtObject, and thinking this too (BTW, couldn't find that but did find ActionCastFakeSpellAtObject) was the same, tried using ga_cast_fake_spell_at_object, but it didn;t seem to work at all. Are they not the same like the ga_play_custom_animation and PlayCustomAnimation() are the same?
Yes, you're right, I forgot the Action prefix to the name, sorry. I just took a look at the ga_cast_fake_spell_at_object script and it looks broken to me. It's simply calling the ActionCastSpellAtObject() function instead of ActionCastFakeSpellAtObject(). If you took that script and simply replaced the function appropriately, you would have your example of what you need to do.
// ga_my_cast_fake_spell_at_object(float fSecondsDelay, string sCaster, int nSpell, string sSpellTarget, int nProjectilePathType)
/*
Description:
Has sCaster appear to cast a spell at sSpellTarget, but with no resulting effects.
Parameters:
float fSecondsDelay - Delay before casting
string sCaster - The caster's tag or identifier, if blank use Dialog Owner. see "ginc_param_const" for TARGET_* constants
int nSpell - spell ID. see NWSCRIPT.nss for SPELL_* constants
string sSpellTarget - The caster's tag or identifier, if blank use PC Speaker. see "ginc_param_const" for TARGET_* constants
int nProjectilePathType - 0 = PROJECTILE_PATH_TYPE_DEFAULT. see NWSCRIPT.nss for PROJECTILE_PATH_TYPE_* constants
*/
#include "ginc_param_const"
void main(float fSecondsDelay, string sCaster, int nSpell, string sSpellTarget, int nProjectilePathType)
{
object oCaster = GetTarget(sCaster, TARGET_OWNER);
object oSpellTarget = GetTarget(sSpellTarget, TARGET_PC_SPEAKER);
AssignCommand(oCaster, DelayCommand(fSecondsDelay, ActionCastFakeSpellAtObject(nSpell, oSpellTarget, nProjectilePathType)));
}
Take that script, rename it to ga_my_cast_fake_spell_at_object (or whatever you want), compile it, and then use it in the same place you were trying the original one in your conversation. Assuming you got the tags right and all, I should think it would work.
Modifié par JasonNH, 30 juin 2011 - 02:50 .
#39
Posté 30 juin 2011 - 02:27
Although I will try to refrain froms asking overly simple questions...
#40
Posté 30 juin 2011 - 02:31
Ask any questions you want, no matter how simple. You wouldn't believe some of the idiotic questions I've asked here.
#41
Posté 30 juin 2011 - 05:30





Retour en haut






