xmoonproductions.org https://www.xmoonproductions.org/ |
|
Abducted tutorial https://www.xmoonproductions.org/viewtopic.php?f=27&t=4247 |
Page 1 of 1 |
Author: | wangchung2nite [ Tue Dec 01, 2015 12:36 am ] |
Post subject: | Abducted tutorial |
I was going back and reworking some of the Abducted story tutorials and had a question - In the story, when you say hello or anything other than the compliment, the alien responds by running to the cell and telling the main to be quiet, which would be the Walk_Cell state in the alien's Run.dat file. She will then turn around after a short pause (Proceed_Path state) and resume the Walk1 and Walk2 states. As she is walking back to resume the Walk states, how would you code it so she turns around and repeats the Walk_Cell state if something else is said? Currently, the alien repeats the dialogue where ever she is at but will not return to waypoint or face the player. This also affects the Get_Compliment in that, in the aforementioned scenario, she never turns around to face the player and so the story doesn't proceed to the See_Penis state. I have tried setting various Focus elements and #turn commands but nothing has worked. Thanks! |
Author: | Eskarn [ Tue Dec 01, 2015 11:57 pm ] |
Post subject: | Re: Abducted tutorial |
wangchung2nite wrote: I was going back and reworking some of the Abducted story tutorials and had a question - In the story, when you say hello or anything other than the compliment, the alien responds by running to the cell and telling the main to be quiet, which would be the Walk_Cell state in the alien's Run.dat file. She will then turn around after a short pause (Proceed_Path state) and resume the Walk1 and Walk2 states. As she is walking back to resume the Walk states, how would you code it so she turns around and repeats the Walk_Cell state if something else is said? Currently, the alien repeats the dialogue where ever she is at but will not return to waypoint or face the player. When the player says hello or basicly any word aliens ref.dat Code: get.get = hello.greet; if.get = hello.greet; when.get = hello.greet; where.get = hello.greet; why.get = hello.greet; set.get = hello.greet; info.get = hello.greet; word.get = hello.greet; Then she would walk to the waypoint Code: hello.greet = { loc.state.pose_type = STAND;//pose type loc.state.waypoint = "waypoint2";//waypoint name loc.state.speed = 2;// 1 is walk 2 is run loc.state.exact = 0;// 0 mean stand on the waypoint as close as possible i think SetPose(loc.state); SetCharState(loc.state); state.dyn.me.do.prev_state = state.dyn.me.do.state2;//remember the state we are in now for later state.dyn.me.do.state2 = WALK_CELL;//change the state } Code: [WALK_CELL] { [state.dyn.me.pose.result == NONE] return;//wait for the pose to end so stop walking // Be angry and focus on player set_main_exp(A_BIT_ANGRY);//look angry SetFocusElem(FACE);//look at the players face // Talk talk.s = "Be quiet human!";//talk talk.dur = 4.0; talk.file = "alien_hello1"; talk.volume = 0.95; talk.rem.s = "We will deal with your dissection later."; talk.rem.delay = 2.0; talk.rem.dur = 5.0; // Notify player. Will result in 'PLAYER.says_quiet1' ref callback for player loc.be.obj = PLAYER; loc.be.id = state.this; loc.be.action = "says_quiet1"; SendBaseEvent(loc.be); do_set_timer(10);//wait 10 sec state.dyn.me.do.state2 = PROCEED_PATH;//go to the next state } [PROCEED_PATH] { loc.ts = GetTs(); [loc.ts < state.dyn.me.do.ts] return;//wait for the timer to finish // Be angry and focus on player set_main_exp(A_BIT_ANGRY); SetFocusElem(FACE); // Resume path [state.dyn.me.do.prev_state == WALK1] //go back to walking the path based on what the prev state was state.dyn.me.do.state2 = WALK2; else state.dyn.me.do.state2 = WALK1; } As far as i can see from the code and i get CTD when i try to test it She should still respond to being called again there's nothing to say don't do it again wangchung2nite wrote: This also affects the Get_Compliment in that, in the aforementioned scenario, she never turns around to face the player and so the story doesn't proceed to the See_Penis state. I have tried setting various Focus elements and #turn commands but nothing has worked. Thanks! Waypoints have a direction inside of maya i usally color one side of them so i know where the npc will face when they stand on them so try rotating the waypoint around so she stands and faces the correct direction Hope some of this helps |
Author: | wangchung2nite [ Wed Dec 02, 2015 6:07 am ] |
Post subject: | Re: Abducted tutorial |
Thank you for responding. I never got it to work as expected with v3.0 but once I switched to using the story in v3.5 it worked just fine. Maybe it was just a glitch with my v3.0 that a simple re-install will take care of. Nonetheless, I'll continue on with 3.5. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |