Another way to move Silver?

jmnevil54
25 Sept 2017, 00:52

Another way to do this?

This is probably a quick fix, but this function won't work, and I will need another way to do it.
This:

if (Contains (Route 23,Silver)) {
  if (game.pov.parent = Route 23) {
    msg ("Silver speaks \"Professor Birch dropped Pokemon at Lake of Rage! This is our chance! Come on Slowpoke, follow me!\"")
    MoveObject (Silver, Lake of Rage)
  }
}

I'm trying to move 'Silver' after entering "Route 23".
I put in the "initialisation script" (The Pixie's newest addition to the online Quest, to provide objects with attributes). It didn't work.


K.V.
25 Sept 2017, 01:26
if (Silver.parent = Route 23) {

You can try that, but no promises. Didn't test it. (Let me know though. If that doesn't work, we'll MAKE it work!)


K.V.
25 Sept 2017, 01:33

After entering room

if (Silver.parent = Route 23) {
  msg ("Silver exits!")
  RemoveObject (Silver)
}

You are in a room.
You can go north.

> go north

You are in a Route 23.
You can see a Silver.
You can go south.
Silver exits!


if (game.pov.parent = Route 23) { would be pointless in this example, since I have it on the room enter script.


K.V.
25 Sept 2017, 01:55

This also works on the room enter script, if you just fancy using Contains:

if (Contains(Route 23, Silver)) {
  msg ("Silver exits!")
  RemoveObject (Silver)
}

jmnevil54
25 Sept 2017, 02:16

Alright, I'll see what works.


The Pixie
25 Sept 2017, 07:05

I put in the "initialisation script" (The Pixie's newest addition to the online Quest, to provide objects with attributes). It didn't work.

The initialisation script only runs once, when the game starts. I would guess as KV says, you want this in the room enter script so Quest checks where the silver is every time the player goes to that location.