Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Author Topic: moving characters together  (Read 3459 times)

0 Members and 1 Guest are viewing this topic.

binary1

  • Supporter
  • Occasional poster
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 51
    • View Profile
moving characters together
« on: April 13, 2015, 07:51:42 AM »

I want two NPC's to follow the main player character into another room. The animation is triggered by dialogue.  At a certain point, the main character goes to the door. Then the other two characters follow.  The scene changes when they all get there.  Is there a way to make the three move at the same time?  Right now, they move one-by-one, which looks a little strange.

Thanks for any suggestions.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: moving characters together
« Reply #1 on: April 13, 2015, 08:00:11 AM »

Instead actor.GoTo() use actor.GoToAsync(). That one doesn't block the script execution until the action is finished.

Code: WME Script
  1. actor1.GoToAsync(100, 200);
  2. Sleep(1000);
  3. actor2.GoToAsync(100, 200);
  4. Sleep(1000);
  5. actor3.GoTo(100, 200);
  6.  

This will send the three actors in 1 second intervals.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

binary1

  • Supporter
  • Occasional poster
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 51
    • View Profile
Re: moving characters together
« Reply #2 on: April 13, 2015, 07:05:19 PM »

That worked like a charm!  Thanks for the fast response.  Moving on...
Logged
 

Page created in 0.03 seconds with 21 queries.