The ins and outs of Teleportation

Error message

Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /var/www/pied-piper.ermarian.net/includes/common.inc).
AuthorTopic: The ins and outs of Teleportation
Warrior
Member # 5274
Profile #0
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;

--------------------
I assume my reputation for arrogant presumption precedes me
Posts: 107 | Registered: Thursday, December 9 2004 08:00
...b10010b...
Member # 869
Profile Homepage #1
Can't be done, I'm afraid. The only way to successfully call move_to_new_town is if it's called by the party stepping on a special rectangle.

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00
Shock Trooper
Member # 5459
Profile Homepage #2
Unfortunately, the call only works in one of those blue rectangle thingies. You're just going to have to figure a way to start that cutscene using the rectangles.

Curses Thuryl! How dare you answer at the same time as me?

[ Friday, September 23, 2005 00:39: Message edited by: Smoo ]

--------------------
These are my scenarios. I may have too much free time but I really don't care.
Backwater Calls, Magus of Cattalon, Rats Aplenty
Get them here
Visit The Lyceum for all your rating needs.
Posts: 211 | Registered: Sunday, January 30 2005 08:00
Warrior
Member # 5274
Profile #3
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.

[ Friday, September 23, 2005 04:48: Message edited by: Poit ]

--------------------
I assume my reputation for arrogant presumption precedes me
Posts: 107 | Registered: Thursday, December 9 2004 08:00
Master
Member # 5977
Profile Homepage #4
It really can't be done? teleportation after a cutscene? That's really too bad. I'm sure I did see somewhere, although i can't remember where exactly, that I saw it happen.

--------------------
Play and rate my scenarios:

Where the rivers meet
View my upcoming scenario: The Nephil Search: Escape.

Give us your drek!
Posts: 3029 | Registered: Saturday, June 18 2005 07:00
...b10010b...
Member # 869
Profile Homepage #5
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.)

[ Friday, September 23, 2005 06:16: Message edited by: Theriac ]

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00
Off With Their Heads
Member # 4045
Profile Homepage #6
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.

[ Friday, September 23, 2005 06:18: Message edited by: Kelandon ]

--------------------
Arancaytar: Every time you ask people to compare TM and Kel, you endanger the poor, fluffy kittens.
Smoo: Get ready to face the walls!
Ephesos: In conclusion, yarr.

Kelandon's Pink and Pretty Page!!: the authorized location for all things by me
The Archive of all released BoE scenarios ever
Posts: 7968 | Registered: Saturday, February 28 2004 08:00
Master
Member # 5977
Profile Homepage #7
Okay, sorry, sometimes I just read to fast and miss some things. Thanks for clarifying though. It saved me.

--------------------
Play and rate my scenarios:

Where the rivers meet
View my upcoming scenario: The Nephil Search: Escape.

Give us your drek!
Posts: 3029 | Registered: Saturday, June 18 2005 07:00
Infiltrator
Member # 4256
Profile #8
Could it be done by first teleporting them into the special rectangle? Or do they actually have to 'step' in it?

--------------------
"Let's just say that if complete and utter chaos was lightning, he'd be the sort to stand on a hilltop in a thunderstorm wearing wet copper armour and shouting 'All gods are false'."
Posts: 564 | Registered: Wednesday, April 14 2004 07:00
Master
Member # 5977
Profile Homepage #9
I think you probably really need to step on it. As was just stated, teleportation from a dialogue node wouldn't work, so teleporting them on a special rectangle would probably also not work, I guess.

--------------------
Play and rate my scenarios:

Where the rivers meet
View my upcoming scenario: The Nephil Search: Escape.

Give us your drek!
Posts: 3029 | Registered: Saturday, June 18 2005 07:00
Law Bringer
Member # 4153
Profile Homepage #10
You definitely have to make them step on it. I've tried the "teleport them onto the square" approach, and it doesn't work.

--------------------
Gamble with Gaea, and she eats your dice.

I hate undead. I really, really, really, really hate undead. With a passion.
Posts: 4130 | Registered: Friday, March 26 2004 08:00
Off With Their Heads
Member # 4045
Profile Homepage #11
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.

--------------------
Arancaytar: Every time you ask people to compare TM and Kel, you endanger the poor, fluffy kittens.
Smoo: Get ready to face the walls!
Ephesos: In conclusion, yarr.

Kelandon's Pink and Pretty Page!!: the authorized location for all things by me
The Archive of all released BoE scenarios ever
Posts: 7968 | Registered: Saturday, February 28 2004 08:00
? Man, ? Amazing
Member # 5755
Profile #12
Can the cutscene move the party onto a blue rectangle? I guess the question is if the engine will check for specials while already in a cutscene node.

*this message needs a sponsor*

--------------------
quote:
Originally written by Kelandon:

Well, I'm at least pretty sure that Salmon is losing.


Posts: 4114 | Registered: Monday, April 25 2005 07:00
Law Bringer
Member # 4153
Profile Homepage #13
It will NOT check for special encounters when in cutscene mode. That would probably have made things too complicated, engine-wise.

--------------------
Gamble with Gaea, and she eats your dice.

I hate undead. I really, really, really, really hate undead. With a passion.
Posts: 4130 | Registered: Friday, March 26 2004 08:00
Warrior
Member # 5274
Profile #14
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?

--------------------
I assume my reputation for arrogant presumption precedes me
Posts: 107 | Registered: Thursday, December 9 2004 08:00
...b10010b...
Member # 869
Profile Homepage #15
Ah, yeah. The problem's almost certainly the begin_talk_mode(). You'll just have to do whatever dialogue you need through dialog boxes and the cutscene itself.

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00
Off With Their Heads
Member # 4045
Profile Homepage #16
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.

--------------------
Arancaytar: Every time you ask people to compare TM and Kel, you endanger the poor, fluffy kittens.
Smoo: Get ready to face the walls!
Ephesos: In conclusion, yarr.

Kelandon's Pink and Pretty Page!!: the authorized location for all things by me
The Archive of all released BoE scenarios ever
Posts: 7968 | Registered: Saturday, February 28 2004 08:00
Master
Member # 5977
Profile Homepage #17
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?

--------------------
Play and rate my scenarios:

Where the rivers meet
View my upcoming scenario: The Nephil Search: Escape.

Give us your drek!
Posts: 3029 | Registered: Saturday, June 18 2005 07:00
...b10010b...
Member # 869
Profile Homepage #18
You actually need several different rectangles surrounding the party, so that the party can be placed in such a way that they're not actually in a rectangle but can't go far without moving into one.

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00
Warrior
Member # 246
Profile #19
quote:
Originally written by Flagellation:

Can't be done, I'm afraid. The only way to successfully call move_to_new_town is if it's called by the party stepping on a special rectangle.
I don't see the point in Jeff not allowing this at any time. What would be his motive? :confused:
Posts: 117 | Registered: Friday, November 2 2001 08:00
...b10010b...
Member # 869
Profile Homepage #20
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.

[ Friday, October 14, 2005 00:02: Message edited by: Thuryl ]

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00
Infiltrator
Member # 3040
Profile #21
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.

--------------------
5.0.1.0.0.0.0.1.0...
Posts: 508 | Registered: Thursday, May 29 2003 07:00