create new exit script

Gng

Heyall

I know there's a way to make a new script-type attribute, e.g. for exits, but I can't remember for the life of me.

Is it something like this?

exit.new_script => {player.parent = exit.to}

That looks right to me. I've not actually tried putting something like that on a single line, but I would expect it to work.

That's assuming that exit is the name of the exit. If it's a variable, it wouldn't be available within the new script, so you would have to do:

exit.new_script => {
  player.parent = this.to
}

(using this to refer to the object that owns the script attribute)


Gng

thanks for the reply.

wait, so if the script is in let's say, NPC's attribute: edit_exit_script, "this" will refer to the exit? and not the NPC?


This topic is now closed. Topics are closed after 14 days of inactivity.

Support

Forums