Someone could post a working script to add a cutscenes to a mod? i'll try this for trigger the cutscene but give an error, i dont figure what is wrong...
#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_MODULE_LOAD:
{
object oPlayer = GetHero();
CS_LoadCutscene(R"intro_la_via.cut");
DisplayFloatyMessage(oHero, "Test", FLOATY_MESSAGE, 16777215, 2.f);
PlayCutscene();
break;
}
}
}
this is the error in compiling: E: 14:04:07 - intro_script.nss - intro_script.nss(17): Variable defined without type (while compiling var_constants_h.nss)
Cutscenes script help.
Débuté par
Ogre78
, janv. 04 2010 01:40
#1
Posté 04 janvier 2010 - 01:40
#2
Posté 04 janvier 2010 - 05:21
Looking at line 17 of your code you'll see the following:
DisplayFloatyMessage(oHero, "Test", FLOATY_MESSAGE, 16777215, 2.f);
You referenced "oHero", but you defined "oPlayer" above. That's what the error message is telling you. Either change "oPlayer" in the "object oPlayer = GetHero();" to "oHero" or change the "oHero" in the "DisplayFloatyMessage" to "oPlayer" if you prefer.
DisplayFloatyMessage(oHero, "Test", FLOATY_MESSAGE, 16777215, 2.f);
You referenced "oHero", but you defined "oPlayer" above. That's what the error message is telling you. Either change "oPlayer" in the "object oPlayer = GetHero();" to "oHero" or change the "oHero" in the "DisplayFloatyMessage" to "oPlayer" if you prefer.
#3
Posté 04 janvier 2010 - 07:28
THX!





Retour en haut






