Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


Author Topic: Automating region entities in scene templates  (Read 2589 times)

0 Members and 1 Guest are viewing this topic.

Kaz

  • Arberth Studios
  • Regular poster
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 228
  • The story is the game
    • View Profile
    • Info on 'Rhiannon' & 'Coven'
Automating region entities in scene templates
« on: October 17, 2008, 07:27:10 PM »

Hello All

With 'Rhiannon' off and making its way in the world, time to start the next project. Want to speed up production this time, so now very interested in templates. The thing I'd like to learn is how to make a scene template that already has some pre-made regions, with cursors, already associated with partially-written scripts.

Eg we need a scene template "WidePan" that will always contain at least five region entities - GoLeft, PanLeft, GoForward, PanRight, GoRight and possibly LookUp, LookDown - always the same size, with appropriate cursors and associated scripts - so the PanLeft script will always contain a ScrollTo(); and the GoLeft script will always contain a Game.ChangeScene("",0,0); and so on. Another case is that we'll need a ZoomedView scene template that will always have a 'ZoomOut' region with a given cursor - and so on.

Can anybody point me to a tutorial for scene templates with predefined regions and scripts - or perhaps pass me a few tips?

Thanks
Logged
\"Fans of popular horror adventures like Scratches and Barrow Hill should start bracing themselves for another haunting experience, as independent developer Arberth Studios has announced production on its debut title Rhiannon - Curse of the Four Branches.\" - AdventureGamers.com

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Automating region entities in scene templates
« Reply #1 on: October 18, 2008, 09:39:12 AM »

1) Create your scene in SceneEdit as you normally would, add all the common functionality you want new scenes to inherit. Save and quit SceneEdit.
2) Copy the directory containing your scene to [path where wme is installed]\template\scene.
3) Rename the .scene file to $$NAME$$.scene
4) Edit the renamed file in some text editor (notepad will do) and change the first few lines to:

Code: [Select]
; $EDITOR_PROJECT_ROOT_DIR$ $$PROJECT_ROOT$$

SCENE {
  NAME="$$NAME$$"
  CAPTION=""
  SCRIPT="$$BASE_PATH$$\scr\scene_init.script"
  SCRIPT="scripts\scene.script"

Basically, you need to replace the real name of the scene with $$NAME$$ macro and the path to scene file with $$BASE_PATH$$ macro.

5) Create a new file called _template in the scene directory, with the following content:

Code: [Select]
$$DESC Some description of the template

If unsure, look at the existing scene templates for reference.


And that's it. Next time you add a new scene in ProjectMan, it should offer you your new template.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Kaz

  • Arberth Studios
  • Regular poster
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 228
  • The story is the game
    • View Profile
    • Info on 'Rhiannon' & 'Coven'
Re: Automating region entities in scene templates
« Reply #2 on: October 22, 2008, 08:13:32 AM »

Thanks, I'll try that.

And finally got it finished. And Vista only fought me every millimetre of the way :(

But it works! Thanks again.
« Last Edit: November 02, 2008, 06:46:38 PM by Kaz »
Logged
\"Fans of popular horror adventures like Scratches and Barrow Hill should start bracing themselves for another haunting experience, as independent developer Arberth Studios has announced production on its debut title Rhiannon - Curse of the Four Branches.\" - AdventureGamers.com
 

Page created in 0.039 seconds with 23 queries.