Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Author Topic: scene template  (Read 3648 times)

0 Members and 1 Guest are viewing this topic.

fireside

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 211
    • View Profile
scene template
« on: July 08, 2013, 04:27:48 AM »

There is a scene template for 1280 x 720 in scripts and plugins, but doesn't say how to use it.  What do I do with it?  I've been resetting everything on each new scene so far.  Apparently we can make our own then?  Is there any information on it?

Also, out of curiosity, is it possible to change the skin on the Wintermute setup window that asks for full screen etc? 
« Last Edit: July 08, 2013, 05:40:25 AM by fireside »
Logged

Azrael

  • Regular poster
  • ***
  • Karma: 9
  • Offline Offline
  • Gender: Male
  • Posts: 155
    • View Profile
    • Mad Orange
Re: scene template
« Reply #1 on: July 08, 2013, 07:29:53 AM »

Go where you have install WME, for example C:\Program Files (x86)\WME DevKit .
Here there is the template folder, inside there are folders for each template (actors, scenes, sprites ...).

Inside scene folder you can create your own folder for you scene and place your files.
After that you have to change the name of the scene to "$$NAME$$.scene" so it take the name that you choose when you create the new scene with this template.

Also you have to change something inside your "$$NAME$$.scene" file and "scene_init.script".

In $$NAME$$.scene usually you have to change the name of the scene and the path of the things related to the scene:

Code: WME Script
  1. SCENE {
  2.   NAME="$$NAME$$"
  3.   CAPTION=""
  4.   SCRIPT="$$BASE_PATH$$\scr\scene_init.script"
  5.   SCRIPT="scripts\scene.script"

And also the path for the background:

Code: WME Script
  1.     ENTITY {
  2.       NAME="background"
  3.       CAPTION=""
  4.       ACTIVE=TRUE
  5.       X=0
  6.       Y=0
  7.       SCALABLE=FALSE
  8.       REGISTRABLE=FALSE
  9.       SHADOWABLE=FALSE
  10.       EDITOR_SELECTED=TRUE
  11.       SPRITE="$$BASE_PATH$$\background.bmp"
  12.     }

If you have other elements that are scene's folder related change them.

Inside your "scene_init.script" you have to change your actor var in $$ACTOR$$ and your scene's state var in State$$NAME$$, for example:

Code: WME Script
  1. #include "scripts\base.inc"
  2.  
  3. // here comes the stuff which initializes the scene
  4.  
  5. $$ACTOR$$.SkipTo(400, 400);
  6. $$ACTOR$$.Direction = DI_DOWN;
  7. $$ACTOR$$.Active = true;
  8.  
  9.  
  10. ////////////////////////////////////////////////////////////////////////////////
  11. // scene state
  12. global State$$NAME$$;
  13.  
  14.  
  15. // default values
  16. if(State$$NAME$$==null)
  17. {
  18.   State$$NAME$$.Visited = false;
  19.   // add scene states here
  20. }
  21.  
  22.  
  23.  
  24. ////////////////////////////////////////////////////////////////////////////////
  25. // setup scene according to state variables
  26.  
  27.  
  28.  
  29. ////////////////////////////////////////////////////////////////////////////////
  30. if(!State$$NAME$$.Visited)
  31. {
  32.   State$$NAME$$.Visited = true;
  33.  
  34.   // this is our first visit in this scene...
  35. }
  36.  
  37.  

Last thing you need the "_template", copy it form another template, open it with an editor and change the description.


About the setup window no, is not possible. Probably the only way would be take the WME source code and change it.
Logged

fireside

  • Supporter
  • Regular poster
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 211
    • View Profile
Re: scene template
« Reply #2 on: July 08, 2013, 11:46:17 AM »

Ok, thanks.
Logged
 

Page created in 0.047 seconds with 24 queries.