Aller au contenu

Photo

Script problem {problem solved}


  • Veuillez vous connecter pour répondre
6 réponses à ce sujet

#1
ladyofpayne

ladyofpayne
  • Members
  • 3 103 messages
 I want my module start with cutscene but there is a problem- script I have took from WIKI doesn't work. Please can you help me?
My code
#include "sys_chargen_h"
#include "utility_h"
#include "plt_demon_main"
#include "wrappers_h"

void main()
{
event ev = GetCurrentEvent();
int nEventType = GetEventType(ev);
switch(nEventType)
{
case EVENT_TYPE_AREALOAD_SPECIAL:
{
if (!WR_GetPlotFlag(PLT_DEMON_MAIN, DEMON_INTRO_COMPLETE))
{
CS_LoadCutscene(R"beginning.cut");
WR_SetPlotFlag(PLT_DEMON_MAIN, DEMON_INTRO_COMPLETE,TRUE); //sets the plot flag to ensure we don't repeat the intro cutscene.
}
break;
}
}
}
It sends me two error messages
sys_chargen_h.nss - sys_chargen_h.nss(?): Script must contain either a main or StartingConditionalthedemon_start.nss - Unable to get the resource information for "demon_main" of type "plo"

Modifié par ladyofpayne, 29 novembre 2013 - 04:13 .


#2
dr.drummie

dr.drummie
  • Members
  • 51 messages
hi!
not sure, but as i recall it, it is about some syntax error (my toolset is currently down for maintenance, well it's down for almost a year now, luckily i didn't touch dragon age folders)

in my case this script section worked fine:


case EVENT_TYPE_AREALOAD_POSTLOADEXIT:
{
if (WR_GetPlotFlag(PLT_KIVSPTEST_MAIN_PLOT, LAKE_ENTERED_FIRST_TIME) == FALSE)
{
// Start cutscene
CS_LoadCutscene(R"kivsptest_intro.cut");
PlayCutscene();
WR_SetPlotFlag(PLT_KIVSPTEST_MAIN_PLOT, LAKE_ENTERED_FIRST_TIME, TRUE);
//Ambient_Start(GetObjectByTag(KSP_CR_NJOKO), AMBIENT_SYSTEM_ENABLED, AMBIENT_MOVE_INVALID, AMBIENT_MOVE_PREFIX_NONE, 108);
}
//KSP_ActivateWideOpenWorldMap();
SetMusicIntensity(1);
break;
}

#3
ladyofpayne

ladyofpayne
  • Members
  • 3 103 messages
Please can you write where and what I should write to work with it in my module. For example- YOUR_MODULE_PLT

Modifié par ladyofpayne, 13 octobre 2013 - 04:38 .


#4
dr.drummie

dr.drummie
  • Members
  • 51 messages
as i see there is nothing wrong with your script.. this code is from that specific area script? can you comment include for "sys_chargen_h"?

#5
ladyofpayne

ladyofpayne
  • Members
  • 3 103 messages
This cutscene starts in the same location where module begins.

#6
Sunjammer

Sunjammer
  • Members
  • 925 messages
I think you have the name of include file for your plot wrong.

The name of the include file generated by the toolset is always plt_<plot-name>. So for your script to work the name of your plot must be demon_main and I suspect it is actually something else. You will have to correct the name of your plot or correct the name of the include. Doing this will fix both issues (the sys_chargen_h isn't a real error - just the compiler getting confused) and allow your script to compile.

Modifié par Sunjammer, 18 octobre 2013 - 11:43 .


#7
ladyofpayne

ladyofpayne
  • Members
  • 3 103 messages
{problem solved}