Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read more)

Author Topic: Actor position  (Read 2761 times)

0 Members and 1 Guest are viewing this topic.

Kusurovic

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 1
    • View Profile
Actor position
« on: December 04, 2022, 02:44:41 PM »

Hello everyone!

How do I change the starting position of a player (Molly)?

1. I downloaded version 1.9.1
2. I maked test project
3. I created new scene and import new background image
4. I was edit floor where actor can walk

How can I reposition actor Molly to stand where I want to stand on begin of scene?

Thanks in advance.

Kusurović
« Last Edit: December 04, 2022, 02:54:45 PM by Kusurovic »
Logged

Mot

  • Occasional poster
  • **
  • Karma: 3
  • Offline Offline
  • Posts: 54
    • View Profile
Re: Actor position
« Reply #1 on: December 04, 2022, 08:35:12 PM »

Hello Kusurović  :)

For example:

Code: WME Script
  1. // Molly will be placed at the coordinates 139, 428
  2. actor.SkipTo(139, 428);
  3.  
  4. // And she will be facing downwards and to the right
  5. actor.Direction = DI_DOWNRIGHT;
  6.  

In case you want to see a working example, you will find a demo project within the folder where you installed WME Development Kit. Possibly C:\Program Files (x86)\WME DevKit\projects\wme_demo\wme_demo.wpr

The snippet of code you see above, I got it from said demo - more precisely, from the file scene_init.script, located in the project tree pane under scenes > room > scr.
« Last Edit: December 04, 2022, 08:39:56 PM by Mot »
Logged
 

Page created in 0.021 seconds with 21 queries.