Jump to content

The ins and outs of Teleportation


Poit

Recommended Posts

Hi,

 

Lately i've been having some problems with the move_to_new_town call. When I use it as part of a node like example A below it works perfectly fine as it is intended to. But when I try to trigger a teleport by inserting the call inside a cutscene or right after a conversation with a character, for instance begin_talk_mode(); then move_to_new_town(); it doesn't function at all.

 

My question is whether it is possible to trigger a move_to_new_town call without having the player step on a specific node. I've been bamboozled by this for a long time as I have two or three instances in my scenario where a flashback requires a shift in town scenery, at the moment I've finished the cutscenes but need to insert them so the narritive flows nicely. Any help would be appreciated.

 

Example 1 (-normal functioning move_to_new_town call)

 

beginstate 10;

 

reset_dialog();

add_dialog_str(0,"The portal to your next assignment is shimmering with magical force. Perhaps it would be a good idea to enter before it drains its power source.",0);

add_dialog_choice(0,"Enter.");

add_dialog_choice(1,"Stay here.");

choice = run_dialog(1);

if (choice == 1) {

play_sound(10);

block_entry(1);

move_to_new_town (4,10,4);

}

if (choice == 2) {

end();

block_entry(1);

}

 

break;

 

Example 2 -(Completely screwed up, oh my god what have I done wrong move_to_new_town call)

 

text_bubble_on_char(42,"");

text_bubble_on_char(44,"Rutland don't,");

force_instant_terrain_redraw();

pause(20);

 

text_bubble_on_char(44,"");

text_bubble_on_char(44,"It's not worth it");

force_instant_terrain_redraw();

pause(20);

 

text_bubble_on_char(44,"");

text_bubble_on_char(44,"I submit to your judgement my liege.");

force_instant_terrain_redraw();

pause(20);

 

set_total_visibility(0);

 

move_to_new_town (4,10,4);

 

set_flag(13,0,1);

 

}

 

break;

Link to comment
Share on other sites

Well that's just too bad. I think I'll have to find a cunning method to trigger teleportation without the player having to directly intervent and step on a node. Mad Ambition and Bahssikava seem to the most likely scenarios that would involve some variant on the player controlled method (still haven't played Bahs) so I might just have a poke through their scripts.

Link to comment
Share on other sites

You can do it after a cutscene, but only if that cutscene is triggered by the party stepping into a special rectangle. If it's triggered by something else -- like, say, using an item, or activating a terrain script -- then you can't move the party to a new town afterwards. The cutscene itself doesn't matter as far as the move_to_new_town call is concerned. You can put any code you want before move_to_new_town -- it's how the state is triggered that's the important part.

 

(Incidentally, it's perfectly okay to teleport the party within a town at any time. It's only when you try to move them between towns that you have to worry about how the state is called.)

Link to comment
Share on other sites

Thralni, since you seem to have missed the details: teleportation after a cut scene can happen, but that cut scene has to have been called from a special rectangle, not from anything else (like a terrain script, a creature script, or a START_STATE). Bahs has a few places that dodge this, like the very first cut scene in town 1.

 

EDIT: As Thuryl said.

Link to comment
Share on other sites

Quote:
You can do it after a cutscene, but only if that cutscene is triggered by the party stepping into a special rectangle. If it's triggered by something else -- like, say, using an item, or activating a terrain script -- then you can't move the party to a new town afterwards. The cutscene itself doesn't matter as far as the move_to_new_town call is concerned. You can put any code you want before move_to_new_town -- it's how the state is triggered that's the important part
That's actually one of the first things I tried but i still couldn't get it to work properly. For instance the party would walk into a room and step on a node. This node would then start the cutscene, a few NPC's would say lines and then begin_talk_mode(); would kick into effect with one specific NPC, starting an indepth conversation. Once you hit "end conversation" then there was the move_to_new_town(); call.

I could think of two possible reasons why this wouldn't work. Firstly its the actual begin_talk_mode(); that causes the problem. Once you have had a dialogue conversation does that mean the node that initiated it is finished and unable to be restarted?

Secondly if the problem wasn't the conversation itself it could be the way I ended it. For instance maybe action = END_TALK; and
state = (one number); nextstate = (identical number); lead to different script results once the conversation is terminated. Is there a right way and a wrong way to end a conversation so that the script progresses?

Quote:
You can teleport them onto a space that is surrounded by special rectangles and use force_view_center to keep the party out of sight, though.
That's an intersting suggestion. If it turns out begin_talk_mode(); prevents a move_to_new_town(); call from completing afterward I may redesign my town and use this method. By the way have you used this successfully before in any of your scenarios?
Link to comment
Share on other sites

Quote:
Originally written by Poit:
Quote:
You can teleport them onto a space that is surrounded by special rectangles and use force_view_center to keep the party out of sight, though.
That's an intersting suggestion. If it turns out begin_talk_mode(); prevents a move_to_new_town(); call from completing afterward I may redesign my town and use this method. By the way have you used this successfully before in any of your scenarios?
Other than the force_view_center part, the first few cut scenes in Bahssikava all work according this principle.
Link to comment
Share on other sites

Quote:
Originally written by Kelandon:
Quote:
Originally written by Poit:
Quote:
You can teleport them onto a space that is surrounded by special rectangles and use force_view_center to keep the party out of sight, though.
That's an intersting suggestion. If it turns out begin_talk_mode(); prevents a move_to_new_town(); call from completing afterward I may redesign my town and use this method. By the way have you used this successfully before in any of your scenarios?
Other than the force_view_center part, the first few cut scenes in Bahssikava all work according this principle.
Now I finally manage to understand how you made it work with all these towns. I as a newbie (I hate that word) Regurly look back at other designer's towns. I saw multiple towns that atcually formed one story. After doing that, I played a bit of the scenario, and saw some things that actually were situated in different towns. Now i know how it works, thanks. Just one minor question: How big should that rectangle exactly be? Probably as larg as the party is?
Link to comment
Share on other sites

  • 3 weeks later...
Quote:
Originally written by Thuryl:
Apparently it's likely to be a limitation inherent in the way the engine handles towns. Allowing move_to_new_town at other times could potentially cause serious bugs.
That's right. It has to do with the order in which the engine handles nodes and scripts. A lot of code would have to be rewritten to accomodate this. Which is no excuse for Jeff not to do it, though.
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...