Scripted player movement

Opulus
22 Jan 2014, 12:32Hey,
I just want to script an "event" like falling down cause the floor breaks under the feet. So I have to move the player. My problem is, that when I look for an moving command I can only find commands to move objects to other objects or objects to the current room.
I think to do what I want I have to move the Object "player" to another room, or not?
I just want to script an "event" like falling down cause the floor breaks under the feet. So I have to move the player. My problem is, that when I look for an moving command I can only find commands to move objects to other objects or objects to the current room.
I think to do what I want I have to move the Object "player" to another room, or not?

jaynabonne
22 Jan 2014, 12:53Yes. The player is an object like anything else. Use MoveObject to move it to the target room, or just set its "parent" attribute to the new room.

Opulus
22 Jan 2014, 13:21Oh okay, thank you ^^
I tried it but I saw only the option move object to object or expression ^^
I din't see that the second object could be a room
I tried it but I saw only the option move object to object or expression ^^
I din't see that the second object could be a room


Opulus
04 Feb 2014, 11:17Well it didnt work...
But if I go in this room I will not move to another room. What did I wrong?
msg ("Suddenly the Floor breakes under your feet and you fall down.")
MoveObject (Player, E2_Room 01)
DecreaseHealth (25)
But if I go in this room I will not move to another room. What did I wrong?

jaynabonne
04 Feb 2014, 12:46I would need to see more to know what's going on. Any chance of attaching your game file or a small subset that shows the problem?

Pertex
04 Feb 2014, 12:48where do you call this script? Does it show the msg? Try this move command:
and just an advice: don't use blanks in object or exit names
MoveObject (game.pov, E2_Room 01)
and just an advice: don't use blanks in object or exit names

Opulus
04 Feb 2014, 12:54Pertex wrote:where do you call this script? Does it show the msg? Try this move command:MoveObject (game.pov, E2_Room 01)
and just an advice: don't use blanks in object or exit names
This worked! Yay, thanks!! ^^ But why? could you explain it to me, please? ^^
jaynabonne wrote:I would need to see more to know what's going on. Any chance of attaching your game file or a small subset that shows the problem?
It would be a problem If you don't understand german ^^ I only translate this small scripts in english but the original would looks like this in the game
msg ("<br/>Ihr betretet tiefere Höhlengänge die nach Norden führen.")
wait {
msg ("Ihr lauft zum Ausgang und hört plötzlich ein knacksen.<br/>")
wait {
msg ("Unter euren Füßen machen sich Risse auf und Ihr lauft vorsichtig weiter.<br/>")
wait {
msg ("Plötzlich bricht der Boden unter euch auf und Ihr fallt in noch tiefere Höhlengänge.")
DecreaseHealth (25)
wait {
MoveObject (game.pov, K2_Raum 01)
}
}
}
}
And it ist the whole file like this ^^ German object names and german messages

Oh an this is the full script of the room

Pertex
04 Feb 2014, 13:30Warum sollten wir deutsch nicht verstehen? Ich wenigstens habe keine Probleme damit
Da sind übrigens einige Rechtschreibfehler in Deinen Messages
The problem is the capitalization. Player is not player
MoveObject (player, E2_Room 01) should work, too.


The problem is the capitalization. Player is not player
MoveObject (player, E2_Room 01) should work, too.

Opulus
04 Feb 2014, 13:47Pertex wrote:Warum sollten wir deutsch nicht verstehen? Ich wenigstens habe keine Probleme damitDa sind übrigens einige Rechtschreibfehler in Deinen Messages
haha
