Zum Inhalt wechseln

Foto

Cutscene does not trigger


  • Bitte melde dich an um zu Antworten
6 Antworten in diesem Thema

#1
Rhidor

Rhidor
  • Members
  • 404 Beiträge

Hey there!

 

I worked on a cutscene, finished my edits and wanted to see how it looks like in-game.

 

Through tutorials I looked up how to add a waypoint and trigger to my area. I even created a script.

 

When I loaded the area in my game, everything seemed to be fine. I once again started as that standart character, but when I walked into the field that should trigger the cutscene... nothing happened. I didn't even see idle character models of the creatures I places there standing around, the place was just desolated.

 

This is my script for the cutscene:

 

#include "log_h"
#include "utility_h"
#include "wrappers_h"
#include "events_h"
 
void main()
{ event ev = GetCurrentEvent(); int nEventType = GetEventType(ev); Log_Events("", ev); switch(nEventType) { case EVENT_TYPE_ENTER: { object oHero = GetHero(); DisplayFloatyMessage(oHero, "Test", FLOATY_MESSAGE, 16777215, 2.f); CS_LoadCutscene(R"hof_vigilskeepexit.cut&quo­t;); PlayCutscene(); break; } }
}
 
What did I do wrong? How can I make the game trigger my cutscene?


#2
Yara C.

Yara C.
  • Members
  • 240 Beiträge

Cutting to the chase I post the script I use to trigger a cutscene from a trigger placed in an area:

#include "events_h"
#include "global_objects_h"
#include "utility_h"

void main ()
{
event ev = GetCurrentEvent();
int nEventType = GetEventType(ev);
int bEventHandled = FALSE;
switch (nEventType)
{
case EVENT_TYPE_ENTER:
{
object oCreature = GetEventCreator(ev);
if(GetObjectActive(OBJECT_SELF)
&& IsPartyMember(oCreature))
{
resource rCutscene = R"cs_CutsceneName.cut";
CS_LoadCutscene(rCutscene);
SetObjectActive(OBJECT_SELF, FALSE);
}
}
break;
}
if (!bEventHandled) //If this event wasn't handled by this script, let the core script try
{
HandleEvent(ev, RESOURCE_SCRIPT_TRIGGER_CORE);
}
}

The cutscene should fire provided all resources (script, trigger with script assigned, area with trigger, etc.) have been exported to your module folder.


  • DahliaLynn, Rhidor und MerAnne gefällt das

#3
Rhidor

Rhidor
  • Members
  • 404 Beiträge

Thanks for the script! The cutscene triggers now.

 

However, the character animated in the cutscene is missing. I get to see the camera movement and different camera shots, though.

 

What's wrong with the character? I made a custom creature and fully animated it in that scene.



#4
Yara C.

Yara C.
  • Members
  • 240 Beiträge

' sure you have exported the character?

 

An easy way not to miss the export of a resource is:

Click on the triangle in the palette window - the options "only show resources checked out to me" and "hide folders" will show up.

Tick both options. Then it is possible to select several resources independent of the resource type at once by drawing a rectangle to select them. Export without dependent resources...

By this method you can check all resources in at once as well. Recommendable if you want to save versions and like to go back to an earlier version in future.

 

I assume that you didn´t talk about a custom creature type ( > apr_base.gda )



#5
Rhidor

Rhidor
  • Members
  • 404 Beiträge

Okay, that was the final problem.

 

It seems that the character I needed was the only one I somehow missed to export. I checked my files and couldn't find him, but now everything works just fine.

 

What did you mean with "triangle" in the palette window though? I couldn't find one there.



#6
Yara C.

Yara C.
  • Members
  • 240 Beiträge

palette-window.jpg

 

This one.


  • Rhidor gefällt das

#7
Rhidor

Rhidor
  • Members
  • 404 Beiträge

Oh. Well, that should've been obvious.

 

Thanks for the help!


  • Yara C. gefällt das