Hi.
I want to put a visual effect in a cutscene, i.e., the cutscene is running and at some point, the PC touches a scroll and I want to see a light coming out of him. I made this work puting an ApplyEffectToObject function, with a delay, in the script that fires the cutscene, but I don't like this solution, because I don't know the time a player takes to choose is lines, so, sometimes, the effect doesn't appear when it should.
So, I tried do use ga_effect in the node where I want to see the effect but there's no light, the PC became blue and all of the part as some sort of enhancement.
I tried to use my own script in the node (can I do that?) with the some result of ga_effect, no sound, no light, just the PC glowing blue... I'm using VFX_BEAM_HOLY.
What I am missing?
Problem with visual effect
Débuté par
anafaria10
, déc. 16 2011 03:32
#1
Posté 16 décembre 2011 - 03:32
#2
Posté 16 décembre 2011 - 03:53
#3
Posté 16 décembre 2011 - 04:09
The script with suggested is much more simple to understand than the ga_effect, but is doing the same thing... VFX_BEAM_HOLY used in ApplyEffectToObject in the script tha fires the cutscene produces the light that I want, but it seems to do another thing when called in the conversation.
#4
Posté 16 décembre 2011 - 05:49
If you know how to script, then you can make a custom script and call that script on the node that you want the VFX to appear.
#5
Guest_Iveforgotmypassword_*
Posté 16 décembre 2011 - 05:57
Guest_Iveforgotmypassword_*
You could use cast_spell_at object ( I don't know if this is how it's written but you'll soon find it in the actions list among other spell casting ones) and fire a lightning bolt at it and that will be on the exact line of the conversation. You can make it so it'll override the NPC so he/she doesn't even need to be a caster.
Or put the effect on the scroll but have it turned off and then turn it on from the conversation then off again on the next line.
Or put the effect on the scroll but have it turned off and then turn it on from the conversation then off again on the next line.
#6
Posté 16 décembre 2011 - 06:04
@M. Rieder: I've tried that, this is my script
void main (){
object oPC = GetLastSpeaker ();
effect eBeam = EffectBeam(VFX_BEAM_HOLY, oPC, BODY_NODE_HAND);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam, oPC, 2.0);
}
but it does the same, the PC glows blue.
void main (){
object oPC = GetLastSpeaker ();
effect eBeam = EffectBeam(VFX_BEAM_HOLY, oPC, BODY_NODE_HAND);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBeam, oPC, 2.0);
}
but it does the same, the PC glows blue.
#7
Guest_Iveforgotmypassword_*
Posté 16 décembre 2011 - 06:55
Guest_Iveforgotmypassword_*
There is a ga_effect in the actions of the conversation you could always cast a heal spell on the scroll with this.
I'm no scripter but there doesn't seem to be a mention of the scroll in your script and the object is the PC not his hand/scroll that might be why he's glowing.
I'm no scripter but there doesn't seem to be a mention of the scroll in your script and the object is the PC not his hand/scroll that might be why he's glowing.
#8
Posté 16 décembre 2011 - 07:11
At this point the scroll is in the player inventory, that's why I've put the effect on the PC, not on the scroll.
The parameters for the EffectBeam function are: type of effect, object on which the effect will appear, where on the object the effect will show; if I understand it right...
The parameters for the EffectBeam function are: type of effect, object on which the effect will appear, where on the object the effect will show; if I understand it right...
#9
Guest_Iveforgotmypassword_*
Posté 16 décembre 2011 - 07:36
Guest_Iveforgotmypassword_*
/* Script generated by
Lilac Soul's NWN Script Generator, v. 2.3
For download info, please visit:
http://nwvault.ign.c...&id=4683&id=625 */
//Put this on action taken in the conversation editor
void main()
{
object oPC = GetPCSpeaker();
object oTarget;
oTarget = GetObjectByTag("my_scroll");
//Visual effects can't be applied to waypoints, so if it is a WP
//the VFX will be applied to the WP's location instead
int nInt;
nInt = GetObjectType(oTarget);
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_BEAM_HOLY), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_BEAM_HOLY), GetLocation(oTarget));
}
This is from Lilac Souls Script generator which does just about everything within reason it might point you in the right direction and is what I use most of the time.
Perhaps the scroll being in the inventory is the problem perhaps you could stick a scroll on a table then point the camera on it with a close up for that conversation line and zap it !
Lilac Soul's NWN Script Generator, v. 2.3
For download info, please visit:
http://nwvault.ign.c...&id=4683&id=625 */
//Put this on action taken in the conversation editor
void main()
{
object oPC = GetPCSpeaker();
object oTarget;
oTarget = GetObjectByTag("my_scroll");
//Visual effects can't be applied to waypoints, so if it is a WP
//the VFX will be applied to the WP's location instead
int nInt;
nInt = GetObjectType(oTarget);
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_BEAM_HOLY), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_BEAM_HOLY), GetLocation(oTarget));
}
This is from Lilac Souls Script generator which does just about everything within reason it might point you in the right direction and is what I use most of the time.
Perhaps the scroll being in the inventory is the problem perhaps you could stick a scroll on a table then point the camera on it with a close up for that conversation line and zap it !
#10
Posté 16 décembre 2011 - 08:00
For a beam effect, there must be two objects: an origin and a target. The beam will travel from the origin to the target. This is defined by how you plug in the parameters on the script.
I recommend you do not use a beam effect. They are more complicated (slightly) and it will not look as good for what you want to do unless you do some really fancy scripting. You will probably want a different visual effect. There are over a hundred visual effects to choose from and a lot of them are really great. I recommend that you download the PowerBar plugin. It has a function that lets you browse the visual effets. Then you can choose a non-beam effect that suits you. This will be easier to implement.
If you still are having problems and simply cannot make it work, let us know and we will continue to work through it. What you want to do is well within the capabilities of the toolset and you will be able to make it happen.
Here's the link for downloading power bar:
http://nwvault.ign.c...ns.Detail&id=34
I recommend you do not use a beam effect. They are more complicated (slightly) and it will not look as good for what you want to do unless you do some really fancy scripting. You will probably want a different visual effect. There are over a hundred visual effects to choose from and a lot of them are really great. I recommend that you download the PowerBar plugin. It has a function that lets you browse the visual effets. Then you can choose a non-beam effect that suits you. This will be easier to implement.
If you still are having problems and simply cannot make it work, let us know and we will continue to work through it. What you want to do is well within the capabilities of the toolset and you will be able to make it happen.
Here's the link for downloading power bar:
http://nwvault.ign.c...ns.Detail&id=34
#11
Posté 16 décembre 2011 - 09:49
Thanks for the support, M. Rieder.
The bar is very handy, thanks for the tip.
But I can't make it work. I'm pretty sure I'm not getting the arguments for ga_effect right.
I've got this: ga_effect ("Visual", "0", "T2.0f", 417, "")
The bar is very handy, thanks for the tip.
But I can't make it work. I'm pretty sure I'm not getting the arguments for ga_effect right.
I've got this: ga_effect ("Visual", "0", "T2.0f", 417, "")
#12
Posté 16 décembre 2011 - 10:05
I finally got it to work!
I forgot the ga_effect script and use this from the vault "Sunjammers_Conversational_Visual_Effect_Scripts", but M. Rieder was right, I was choosing the wrong effect, I had to tried a few of them and finally got what I wanted!
Thanks SO much for the help, The "scroll that sparks" was driving me mad!
I forgot the ga_effect script and use this from the vault "Sunjammers_Conversational_Visual_Effect_Scripts", but M. Rieder was right, I was choosing the wrong effect, I had to tried a few of them and finally got what I wanted!
Thanks SO much for the help, The "scroll that sparks" was driving me mad!
#13
Posté 17 décembre 2011 - 02:47
Glad you got it working. Best of luck with your mod.
#14
Posté 17 décembre 2011 - 06:25
Sometimes I think that having problems making something original happen is almost as fun as seeing it work in the end.
Viable solutions are nice little victories. Glad you got a solution working.
Viable solutions are nice little victories. Glad you got a solution working.
#15
Posté 17 décembre 2011 - 03:53
It's my first module and I have a million questions, so thank you all for the patience and support
Modifié par anafaria10, 17 décembre 2011 - 03:53 .
#16
Posté 17 décembre 2011 - 05:11
Since it's your first module, when in doubt, try to keep it short, simple and very polished. If you make a 4-6 hour module that has virtually no bugs and a solid plot with good areas, you will do well and start to make a good reputation for your modules. Do the fancy stuff on later modules when you know the toolset better.
#17
Posté 17 décembre 2011 - 05:35
That's good advice. Thanks





Retour en haut






