any way of checking if the item already has the appearance?or using the metarule to set art to the main items art?such as item 455 to art 455?
if (obj_art_fid(self_obj) == FID_HMLTHR) then begin
....
end
if (global_var(1644) == 0) then begin
metarule3(107, Scenery_Creation, 33556447, 0);
end
if (global_var(1644) == 1) then begin
if (tile_contains_pid_obj(Get_Car_Hex, elevation(dude_obj), 33555441) != 0) then begin
destroy_object(tile_contains_pid_obj(Get_Car_Hex, elevation(dude_obj), 33555441));
end
Scenery_Creation := create_object_sid(33555441, Get_Car_Hex, elevation(dude_obj), 304);
//metarule3(107, Scenery_Creation, 33555441, 0);
end
procedure map_update_p_proc begin
variable obj := tile_contains_pid_obj(global_var(GVAR_CAR_PLACED_TILE), self_elevation, PID_DRIVABLE_CAR);
if (obj) then
art_change_fid_num(obj, 33556655);
end
if not(in_world_map) then begin
if (tile_contains_pid_obj(Get_Car_Hex, global_var(1646), 33555441) != 1) then begin
Scenery_Creation := create_object_sid(33555441, Get_Car_Hex, global_var(1646), 304);
end else begin
Scenery_Creation := tile_contains_pid_obj(Get_Car_Hex, global_var(1646), 33555441);
end
if (global_var(1644) == 0) then begin
metarule3(107, Scenery_Creation, 33556447, 0);
end
Scenery_Creation := tile_contains_pid_obj(Get_Car_Hex, global_var(1646), 33555441);
if (Scenery_Creation == 0) then begin
Scenery_Creation := create_object_sid(33555441, Get_Car_Hex, global_var(1646), 304);
end
if (global_var(1644) == 0) then begin
metarule3(107, Scenery_Creation, 33556447, 0);
end
set_proto_data(int pid, int offset, int value)
You can still use this to change the FID (change before creating the object)
thnxI don't speak Russian - use google translate
#define PROTO_FID (8)
set_proto_data(PID_DRIVABLE_CAR, PROTO_FID, 0x2000000 + NumberYourArtFromScenery.Lst);
set_proto_data(33555441, 8, (0x2000000 + 1021));
Also, why don't you use macros?
xm, it is not understandably whether this script is global or normal?