-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathall_methods.gml
56 lines (52 loc) · 1.57 KB
/
all_methods.gml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// api_all_trees()
// gets all the tree instance ids in the world - intended for worldgen messin, use sparingly
function sc_mod_api_all_trees() {
var ids = [];
instance_activate_object(ob_tree);
with (ob_tree) {
array_push(ids, id);
}
sc_player_camera(global.PLAYER);
sc_player_move();
sc_player_move_update();
return ids;
}
// api_all_flowers()
// gets all the flower inst ids in the world - intended for worldgen messin, use sparingly
function sc_mod_api_all_flowers(filter_oid) {
var ids = [];
instance_activate_object(ob_flower);
with (ob_flower) {
if (filter_oid == undefined || filter_oid == oid) array_push(ids, id);
}
sc_player_camera(global.PLAYER);
sc_player_move();
sc_player_move_update();
return ids;
}
// api_all_objects()
// gets all the generic objs inst ids in the world - intended for worldgen messin, use sparingly
function sc_mod_api_all_objects(filter_oid) {
var ids = [];
instance_activate_object(ob_generic);
with (ob_generic) {
if (filter_oid == undefined || filter_oid == oid) array_push(ids, id);
}
sc_player_camera(global.PLAYER);
sc_player_move();
sc_player_move_update();
return ids;
}
// api_all_menu_objects()
// gets all the flower inst ids in the world - intended for worldgen messin, use sparingly
function sc_mod_api_all_menu_objects(filter_oid) {
var ids = [];
instance_activate_object(ob_menu_object);
with (ob_menu_object) {
if (filter_oid == undefined || filter_oid == oid) array_push(ids, id);
}
sc_player_camera(global.PLAYER);
sc_player_move();
sc_player_move_update();
return ids;
}