xmoonproductions.org
https://xmoonproductions.org/

Question about dynamic waypoints
https://xmoonproductions.org/viewtopic.php?f=27&t=5444
Page 1 of 1

Author:  CruzCoda [ Wed May 16, 2018 4:55 pm ]
Post subject:  Question about dynamic waypoints

I'm currently messing around with the Tentacle Dreams Ex mod for 3.5. Specifically the first meeting with Saiko at her apartment door.

At the moment, I have her stripping naked, then moving to waypoint 6 (similar to when she is offended, but without offending her).

Code:
   loc.task.mood     = HAPPY;
   loc.task.waypoint = "waypoint6";
   start_task_backvag(loc.task);


This is the current method, copied from the [OFFENDED] event.

I noticed though, that a dynamic waypoint is created based on the player location, via the rescue chapter of the Tentacle Dreams story. However, it appears that the script is setting the waypoint based on the loc.sp function, rather than loc.task, then running the crawl event. What I'm looking at, is how to get her to waypoint 6, then have her move forward some degree of distance based off of her current location. More ideal, would be setting her rotation before having her start the backvag task.

Code:
//Event pseudo-code
    set waypoint
    move to waypoint 6
    set rotation to "n" degrees
    move rotation
    set current location + new distance
    move to new dynamic waypoint
    set task at new dynamic waypoint
    start task


Any ideas on how to accomplish this?

Author:  Eskarn [ Thu May 17, 2018 12:12 am ]
Post subject:  Re: Question about dynamic waypoints

Code:
[MOVETOWP6]
   {
      [state.dyn.me.pose.result == NONE] return; //if not currently doing a pose
      loc.state.pose_type = STAND; //use your stand animation
      loc.state.waypoint = "waypoint6"; // use this waypoint  and face its direction
               // loc.state.waypoint = "waypoint6+back"; // use this waypoint but at 180 degrees
      loc.state.exact = 0; // do i have to be standing on the waypoint exactly 0 means no 1 means yes and 2 means YES
      loc.state.speed = 1; // walk to location 2 is run and 3 is crawl i think
      SetPose(loc.state); // do this new pose of walking to my waypoint
                do_set_timer(2); //wait 2 seconds
      state.dyn.me.do.state2 = DONEWTASK; //go to the next task
   }

    [DONEWTASK]
   
   {
      loc.ts = GetTs(); 
      [loc.ts < state.dyn.me.do.ts] return; // wait until the 2 seconds is up
   
      [state.dyn.me.pose.result == NONE] return; // make sure im not still walking and my animation is finished
      
                start_task_backvag(); // start task
                //This is where i would copy and paste the guts of the backvag task and customize it to suit the scene
   }


or if you want it to use the players location its

Code:
loc.state.waypoint = "#MAIN+back";

Author:  CruzCoda [ Thu May 17, 2018 3:12 am ]
Post subject:  Re: Question about dynamic waypoints

Ooooo, that definitely looks like it should do the trick. Will play around with it in the morning. Much appreciated.

Also, a few of the code comments are helping me better understand why certain calls are made, and when, so thanks for that as well. :)

Author:  Eskarn [ Thu May 17, 2018 7:00 am ]
Post subject:  Re: Question about dynamic waypoints

No problem, if you have any other questions feel free to ask.

Author:  CruzCoda [ Thu May 17, 2018 8:19 pm ]
Post subject:  Re: Question about dynamic waypoints

Eskarn wrote:
No problem, if you have any other questions feel free to ask.


Code worked wonders, and does exactly what I need it to do. Thanks again. :)

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/