Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Author Topic: Triggering a in game cut scene  (Read 4155 times)

0 Members and 1 Guest are viewing this topic.

FogGobbler

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 228
    • View Profile
Triggering a in game cut scene
« on: October 18, 2007, 11:24:52 AM »

Hi, everybody!

I´m wondering if there is a better way of triggering a " in game cut scene".

For example, if my hero touches a "button", I want to start a in game cut scene, where the scene changes and the npc walks about.

Up to now I´ve triggered the "cut scene" in my "button"-script, set a global variable to true, changed the scene and in the scene_init file of that scene I check if the variable is true.

It works, but it seems to be a little bit clumsy. Is there a way of using events and how could I do that?

Thanks a lot for all your help and keep up the great work in this forum  ::thumbup

Oli
Logged

sychron

  • Wanderer zwischen den Welten
  • Global Moderator
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 223
  • There is no spoon. The enemy gate is down!
    • View Profile
Re: Triggering a in game cut scene
« Reply #1 on: October 18, 2007, 07:22:50 PM »

Depends on the effect you want to archive. What is it you find "clumsy"?
Logged
... delete the inner sleep ...

FogGobbler

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 228
    • View Profile
Re: Triggering a in game cut scene
« Reply #2 on: October 18, 2007, 10:13:31 PM »

Its sometimes a bit hard to keep track of all the global variables. That´s why I thought there could be another way.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Triggering a in game cut scene
« Reply #3 on: October 22, 2007, 08:38:01 PM »

It's always a good idea to document the global variables you're using.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

sychron

  • Wanderer zwischen den Welten
  • Global Moderator
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 223
  • There is no spoon. The enemy gate is down!
    • View Profile
Re: Triggering a in game cut scene
« Reply #4 on: October 23, 2007, 01:02:39 AM »

You could create another .inc file to keep all your globals, comment them nicely and include the file in every script using the globals. so you have a central place to store them, and you do not need to reference them in each and every script header. Plus, you get a simple way of documenting them.
Logged
... delete the inner sleep ...

FogGobbler

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 228
    • View Profile
Re: Triggering a in game cut scene
« Reply #5 on: October 23, 2007, 07:55:49 AM »

Thanks both of you for your answers. That is a good idea with keeping the globals in an external inc file.
Logged

Jyujinkai

  • Global Moderator
  • Frequent poster
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 352
    • View Profile
    • Jyujinkai's WME Development Blog
Re: Triggering a in game cut scene
« Reply #6 on: October 23, 2007, 08:13:19 AM »

carful though.. dosn't putting a new INC mean that every time it is included in a script all the globals reset to what is started in the INC file?
Logged
<Antoine de Saint-Exupéry> In any thing at all, perfection is finally attained not when there is no longer anything to add, but when there is no longer anything to take away...
<Carl Sagan> If you want to make a apple pie from scratch. You must first... invent the universe

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1456
  • Lamp dog!
    • View Profile
Re: Triggering a in game cut scene
« Reply #7 on: October 23, 2007, 08:28:10 AM »

@Jyujinkai

global MyMightyGlobalVariable

doesn't reset or set anything. It just declares it and make the script aware of its' existence. You then manipulate/use it in the scripts.
Logged
fl*p

sychron

  • Wanderer zwischen den Welten
  • Global Moderator
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 223
  • There is no spoon. The enemy gate is down!
    • View Profile
Re: Triggering a in game cut scene
« Reply #8 on: October 23, 2007, 12:57:05 PM »

DONT put something like

global xyz = 0;

 in the globals.inc file ...

Simply put

global xyz; // variable present for no appearent reason

in the globals.inc file and

xyz = 0;

in your script initialising the variable value.
Logged
... delete the inner sleep ...

Jyujinkai

  • Global Moderator
  • Frequent poster
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 352
    • View Profile
    • Jyujinkai's WME Development Blog
Re: Triggering a in game cut scene
« Reply #9 on: October 23, 2007, 03:15:40 PM »

yea.. sorry that is what i meant Syc.. thanks for being more clear....

inshort.. do not put = anything in your ent.
Logged
<Antoine de Saint-Exupéry> In any thing at all, perfection is finally attained not when there is no longer anything to add, but when there is no longer anything to take away...
<Carl Sagan> If you want to make a apple pie from scratch. You must first... invent the universe
 

Page created in 0.044 seconds with 24 queries.