room_assign

Copy one room to another.

Syntax:

room_assign(ind, room);


Argument Description
ind The index of the original room to be copied from.
room The index of the room to be copied to.


Returns: N/A


Description

This function will copy one room to another, removing all instances, tiles etc... from the room that is being copied to and replacing them completely with the new room contents.


Example:

global.rm = room_add();
room_assign(rm_Base, global.rm);

The above code will add a new room to the game and then copy the contents of the room indexed as "rm_Base" into it.


Back: Rooms
Next: room_instance_add
© Copyright YoYo Games Ltd. 2018 All Rights Reserved