View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0028369||Runner||Functions||Public||2017-11-20 15:49||2018-06-17 21:51|
|Reporter||Stewart Bishop||Assigned To||CoreTech|
|Priority||Low||Severity||C - General||Reproducibility||100%|
|Target Version||Fixed in Version|
|Summary||0028369: Functions: copying a room with room_assign(destination, source), objects in the destination run their step before create event|
|Description||When copying a room with room_assign(destination, source), the objects in the destination room run their step event without running the create event, which can produce errors. This step event trigger happens as soon as room_assign is called, not when the game goes to the destination room, and so objects can run code even if they aren't in the current room.|
Run the attached example. The obj_room_manager should a new room in the create event, then calls room_assign with the template room as the source, and waits 30 steps before going to that new room. The template room has a player object, which should be copied over to the new room.
The expected result is that the room is created, and 30 steps later the game switches to the new room, where you can control the player.
The actual result is that as soon as the game is created, an error is thrown because a variable referenced in the player's step event (created in the player's create event) is not defined.
|Steps To Reproduce||1) Run the sample|
|1.4 Found In||1.4.17|
|2.x Runtime Found In||220.127.116.11|
|2.x Runtime Verified In|