If player is in room...

jmnevil54
14 Jun 2021, 00:32
If (player is in a room) {
  Use earth spell
}

Or something like that.
Will something like...

if (player.parent = room) {
  Spellcode
}

Work?


mrangel
14 Jun 2021, 00:49

Should do.

if (game.pov.parent = room) {

is the standard way to do it, but in some circumstances it might be better to use

if (Contains (room, game.pov)) {

jmnevil54
14 Jun 2021, 02:58

Looks good. Thank you!