View unanswered posts | View active topics It is currently Tue Mar 19, 2024 2:12 am



Reply to topic  [ 5 posts ] 
 Question about dynamic waypoints 
Author Message
Rank 9
Rank 9

Joined: Tue May 15, 2018 10:44 am
Posts: 50
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?


Wed May 16, 2018 4:55 pm
Profile
Rank 17
Rank 17
User avatar

Joined: Fri Feb 27, 2015 2:06 pm
Posts: 682
Location: Australia
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";

_________________
To install a mod

ESKARN'S TUTORIALS

Eskarn's Dungeon Mod(BETA)

Eskarn's puzzle map (story)


Thu May 17, 2018 12:12 am
Profile
Rank 9
Rank 9

Joined: Tue May 15, 2018 10:44 am
Posts: 50
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. :)


Thu May 17, 2018 3:12 am
Profile
Rank 17
Rank 17
User avatar

Joined: Fri Feb 27, 2015 2:06 pm
Posts: 682
Location: Australia
No problem, if you have any other questions feel free to ask.

_________________
To install a mod

ESKARN'S TUTORIALS

Eskarn's Dungeon Mod(BETA)

Eskarn's puzzle map (story)


Thu May 17, 2018 7:00 am
Profile
Rank 9
Rank 9

Joined: Tue May 15, 2018 10:44 am
Posts: 50
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. :)


Thu May 17, 2018 8:19 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group.
Designed by X-Moon Productions.