banjo_oz
First time out of the vault

If I wanted to edit the "Robot Parts" item proto in-game (rather than via a proto editor), can I use code like:
If so, where should I run it? I was trying a global script that does:
... but this crashes the game (even though no errors in the editor/compiler).
Am I using it in the wrong place or is my "set_proto_data" code just plain wrong?
Code:
set_proto_data(obj_pid(PID_ROBOT_PARTS), PROTO_IT_COST, 20);
If so, where should I run it? I was trying a global script that does:
Code:
procedure start begin
if (game_loaded) then begin
set_proto_data(obj_pid(PID_ROBOT_PARTS), PROTO_IT_COST, 20);
end
end
Am I using it in the wrong place or is my "set_proto_data" code just plain wrong?