How do I trigger a cutscene after the player walks over an a certain spot?
Triggering a cutscene
Débuté par
SupercellTornado
, août 25 2010 11:27
#1
Posté 25 août 2010 - 11:27
#2
Posté 26 août 2010 - 12:56
Basically you have to create a 'trigger' resource (green diamond in the palette) and a script resource that it uses. There should be an example script you can get on the wiki by searching the forums. Basically the idea is that you make the trigger, change its script to the one you made in the trigger editor, then place the trigger in your area.
The script should be something like
#include "wrappers_h"
void main()
{
event ev = GetCurrentEvent();
int type = GetEventType(ev);
object creator = GetEventCreator(ev);
switch (type)
{
case EVENT_TYPE_ENTER:
{
if (isPartyMember(creator)
{
CS_LoadCutscene(R"YOURCUTSCENE.cut");
DestroyObject(OBJECT_SELF);
}
break;
}
}
HandleEvent(ev,RESOURCE_SCRIPT_TRIGGER_CORE);
}
But I'm writing this on a netbook so I may have messed something up.
You'll notice in there the trigger also destroys itself so it only fires once.
The script should be something like
#include "wrappers_h"
void main()
{
event ev = GetCurrentEvent();
int type = GetEventType(ev);
object creator = GetEventCreator(ev);
switch (type)
{
case EVENT_TYPE_ENTER:
{
if (isPartyMember(creator)
{
CS_LoadCutscene(R"YOURCUTSCENE.cut");
DestroyObject(OBJECT_SELF);
}
break;
}
}
HandleEvent(ev,RESOURCE_SCRIPT_TRIGGER_CORE);
}
But I'm writing this on a netbook so I may have messed something up.
#3
Posté 26 août 2010 - 04:01
Thanks.
#4
Posté 26 août 2010 - 04:14
Hey ST,
If you look in the recent thread I started about MACHINIMA called "Where to start ... Machinima with Dragons Age!":
social.bioware.com/forum/1/topic/76/index/4547885
You should find a comprehensive answer for your very question further down.
Aidan
If you look in the recent thread I started about MACHINIMA called "Where to start ... Machinima with Dragons Age!":
social.bioware.com/forum/1/topic/76/index/4547885
You should find a comprehensive answer for your very question further down.
Aidan
Modifié par aidanodr, 26 août 2010 - 04:15 .
#5
Posté 28 août 2010 - 03:08
ive organized pertinent cutscene scripts into one post here:
http://social.biowar...58/#post_817758
(just to one-up aidan
nah, just kidding!)
but check out aidan's thread for good startup advice!
http://social.biowar...58/#post_817758
(just to one-up aidan
but check out aidan's thread for good startup advice!





Retour en haut






