This repository was archived by the owner on Mar 31, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathObject.html
More file actions
1083 lines (1071 loc) · 53.6 KB
/
Object.html
File metadata and controls
1083 lines (1071 loc) · 53.6 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
All pieces in the game are an Object. Once you have a reference to an Object you can call these functions like this: <font face="monospace">obj.getPosition()</font>. You can get a reference multiple ways: using the <font face="monospace">self</font> property on an Object scripts, using a GUID with <a href="http://berserk-games.com/knowledgebase/api/#getObjectFromGUID"><font face="monospace">getObjectFromGUID()</font></a>, or as a return type from a function like <a href="#takeObject"><font face="monospace">takeObject()</a></font>.
<br />The Global Script can be referenced by a special keyword <font face="monospace">Global</font>. The <font face="monospace">Global</font> reference is used only for functions getting or setting variables on the Global Script or for specifying the owner of a function in callbacks.
<a class="anchor" name="Member Variables"></a>
<table width="100%">
<caption><strong><h3>Member Variables</h3></strong></caption>
<tr>
<th class="table_column_rv">Type</th>
<th class="table_column_fn">Variable Name</th>
<th>Description</th>
</tr>
<tr>
<td><font face="monospace">float</font></td>
<td><font face="monospace">angular_drag</font></td>
<td><a class="anchor" name="angular_drag"></a>The Object's angular drag.</td>
</tr>
<tr>
<td><font face="monospace"><a href="http://berserk-games.com/knowledgebase/assetbundle/">AssetBundle</a></font></td>
<td><font face="monospace">AssetBundle</font></td>
<td><a class="anchor" name="AssetBundle"></a>If this Object is a Custom AssetBundle, this member variable will be a reference to the <a href="http://berserk-games.com/knowledgebase/assetbundle/">AssetBundle</a> class attached to this Object, otherwise this value will be <font face="monospace">nil</font>. Read only.</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">auto_raise</font></td>
<td><a class="anchor" name="auto_raise"></a>Should this Object automatically raise above other Objects when held?</td>
</tr>
<tr>
<td><font face="monospace">float</font></td>
<td><font face="monospace">bounciness</font></td>
<td><a class="anchor" name="bounciness"></a>The Object's bounciness.</td>
</tr>
<tr>
<td><font face="monospace"><a href="http://berserk-games.com/knowledgebase/clock">Clock</a></font></td>
<td><font face="monospace">Clock</font></td>
<td><a class="anchor" name="Clock"></a>If this Object is a Digital Clock, this member variable will be a reference to the <a href="http://berserk-games.com/knowledgebase/clock">Clock</a> class attached to this Object, otherwise this value will be <font face="monospace">nil</font>. Read only.</td>
</tr>
<tr>
<td><font face="monospace"><a href="http://berserk-games.com/knowledgebase/counter">Counter</a></font></td>
<td><font face="monospace">Counter</font></td>
<td><a class="anchor" name="Counter"></a>If this Object is a Counter, this member variable will be a reference to the <a href="http://berserk-games.com/knowledgebase/counter">Counter</a> class attached to this Object, otherwise this value will be <font face="monospace">nil</font>. Read only.</td>
</tr>
<tr>
<td><font face="monospace">float</font></td>
<td><font face="monospace">drag</font></td>
<td><a class="anchor" name="drag"></a>The Object's drag.</td>
</tr>
<tr>
<td><font face="monospace">float</font></td>
<td><font face="monospace">dynamic_friction</font></td>
<td><a class="anchor" name="dynamic_friction"></a>The Object's dynamic friction.</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">grid_projection</font></td>
<td><a class="anchor" name="grid_projection"></a>Should the grid project onto this object.</td>
</tr>
<tr>
<td><font face="monospace">string</font></td>
<td><font face="monospace">guid</font></td>
<td><a class="anchor" name="guid"></a>The Object's guid. This is the same as the <a href="#getGUID"><font face="monospace">getGUID</font></a> function. Read only.</td>
</tr>
<tr>
<td><font face="monospace">string</font></td>
<td><font face="monospace">held_by_color</font></td>
<td><a class="anchor" name="held_by_color"></a>The color of the Player currently holding the Object. Will be <font face="monospace">nil</font> if the Object is not being held by anyone. Read only.</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">interactable</font></td>
<td><a class="anchor" name="interactable"></a>Can players interact with this Object? If false, only Lua Scripts can interact with this Object.</td>
</tr>
<tr>
<td><font face="monospace">float</font></td>
<td><font face="monospace">mass</font></td>
<td><a class="anchor" name="mass"></a>The Object's mass.</td>
</tr>
<tr>
<td><font face="monospace">string</font></td>
<td><font face="monospace">name</font></td>
<td><a class="anchor" name="name"></a>The Object's formated name or nickname if applicable. Read only.</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">resting</font></td>
<td><a class="anchor" name="resting"></a>Returns <font face="monospace">true</font> if this Object is not moving. Setting this value will wake up or sleep the physics on this object.</td>
</tr>
<tr>
<td><font face="monospace"><a href="http://berserk-games.com/knowledgebase/rpgfigurine">RPGFigurine</a></font></td>
<td><font face="monospace">RPGFigurine</font></td>
<td><a class="anchor" name="RPGFigurine"></a>If this Object is an RPGFigurine, this member variable will be a reference to the <a href="http://berserk-games.com/knowledgebase/rpgfigurine">RPGFigurine</a> class attached to this Object, otherwise this value will be <font face="monospace">nil</font>. Read only.</td>
</tr>
<tr>
<td><font face="monospace">string</font></td>
<td><font face="monospace">script_code</font></td>
<td><a class="anchor" name="script_code"></a>Returns the Lua script on the Object.</td>
</tr>
<tr>
<td><font face="monospace">string</font></td>
<td><font face="monospace">script_state</font></td>
<td><a class="anchor" name="script_state"></a>Returns the saved Lua script state on the Object. See <a href="http://berserk-games.com/knowledgebase/api/#onSave"><font face="monospace">onSave()</font></a>.</td>
</tr>
<tr>
<td><font face="monospace">float</font></td>
<td><font face="monospace">static_friction</font></td>
<td><a class="anchor" name="static_friction"></a>The Object's static friction.</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">sticky</font></td>
<td><a class="anchor" name="sticky"></a>Should Objects on top of this Object stick to this Object when this Object is picked up?</td>
</tr>
<tr>
<td><font face="monospace">string</font></td>
<td><font face="monospace">tag</font></td>
<td><a class="anchor" name="tag"></a>The tag of the Object representing its type. Read only.</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">tooltip</font></td>
<td><a class="anchor" name="tooltip"></a>Should Object show tooltips when hovering over it.</td>
</tr>
<tr>
<td><font face="monospace"><a href="http://berserk-games.com/knowledgebase/texttool">TextTool</a></font></td>
<td><font face="monospace">TextTool</font></td>
<td><a class="anchor" name="TextTool">If this Object is a TextTool, this member variable will be a reference to the <a href="http://berserk-games.com/knowledgebase/texttool">TextTool</a> class attached to this Object, otherwise this value will be <font face="monospace">nil</font>. Read only.</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">use_gravity</font></td>
<td><a class="anchor" name="use_gravity"></a>Does gravity affect this Object?</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">use_grid</font></td>
<td><a class="anchor" name="use_grid"></a>Should this Object snap to grid points?</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">use_hands</font></td>
<td><a class="anchor" name="use_hands"></a>Should this Object go into player hands?</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">use_snap_points</font></td>
<td><a class="anchor" name="use_snap_points"></a>Should this Object snap to snap points?</td>
</tr>
</table>
<a class="anchor" name="Object Properties"></a>
<table width="100%">
<caption><strong><h3>Object Properties</h3></strong></caption>
<tr>
<th class="table_column_rv">Return Value</th>
<th class="table_column_fn">Function Name</th>
<th>Description</th>
</tr>
<tr>
<td><font face="monospace">string</font></td>
<td><font face="monospace">getDescription()</font></td>
<td><a class="anchor" name="getDescription"></a>Gets the description for this Object.</td>
</tr>
<tr>
<td><font face="monospace">string</font></td>
<td><font face="monospace">getGUID()</font></td>
<td><a class="anchor" name="getGUID"></a>Returns the GUID that belongs to this Object.</td>
</tr>
<tr>
<td><font face="monospace">string</font></td>
<td><font face="monospace">getLuaScript()</font></td>
<td><a class="anchor" name="getLuaScript"></a>Gets the Lua script for this Object.</td>
</tr>
<tr>
<td><font face="monospace">string</font></td>
<td><font face="monospace">getName()</font></td>
<td><a class="anchor" name="getName"></a>Returns the nickname for this Object.</td>
</tr>
<tr>
<td><font face="monospace">Table</font></td>
<td><font face="monospace">getTable(string table_name)</font></td>
<td><a class="anchor" name="getTable"></a>Gets a Lua Table for this Object.</td>
</tr>
<tr>
<td><font face="monospace">variable</font></td>
<td><font face="monospace">getVar(string variable_name)</font></td>
<td><a class="anchor" name="getVar"></a>Gets a Lua variable for this Object. Will result in an error if you try to get a Table variable. Use getTable function for getting a Table from the Object.</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">setDescription(string description)</font></td>
<td><a class="anchor" name="setDescription"></a>Sets the description for this Object.</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">setLuaScript(string script)</font></td>
<td><a class="anchor" name="setLuaScript"></a>Sets the Lua script for this Object. Only useful in very rare cases right when this object is spawned. Once the Lua interpreter reads the Lua script, it will not care about this again. Setting this variable after its been read will do nothing.</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">setName(string nickname)</font></td>
<td><a class="anchor" name="setName"></a>Sets the nickname for this Object.</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">setTable(string table_name, Table table)</font></td>
<td><a class="anchor" name="setTable"></a>Sets a Lua Table for this Object.</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">setVar(string variable_name, variable value)</font></td>
<td><a class="anchor" name="setVar"></a>Sets a Lua variable for this Object. Will result in an error if you try to set a Table variable. Use setTable function for setting a Table from the Object.</td>
</tr>
</tr>
</table>
<a class="anchor" name="Object Transform Properties"></a>
<table width="100%">
<caption><strong><h3>Object Transform Properties</h3></strong></caption>
<tr>
<th class="table_column_rv">Return Value</th>
<th class="table_column_fn">Function Name</th>
<th>Description</th>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">addForce(<a href="http://berserk-games.com/knowledgebase/vector">Vector</a>, int force_type)</font></td>
<td>
<a class="anchor" name="addForce"></a>Adds a force vector to the Object. The force type is optional and defaults to Impulse.
<table>
<tr>
<th>Force Type</th>
<th>Value</th>
</tr>
<tr>
<td>Constant Force (uses mass)</td>
<td>1</td>
</tr>
<tr>
<td>Acceleration (ignores mass)</td>
<td>2</td>
</tr>
<tr>
<td>Impulse (uses mass)</td>
<td>3</td>
</tr>
<tr>
<td>Velocity Change (ignores mass)</td>
<td>4</td>
</tr>
</table>
</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">addTorque(<a href="http://berserk-games.com/knowledgebase/vector">Vector</a>, int force_type)</font></td>
<td>
<a class="anchor" name="addTorque"></a>Adds a torque vector to the Object. The force type is optional and defaults to Impulse.
<table>
<tr>
<th>Force Type</th>
<th>Value</th>
</tr>
<tr>
<td>Constant Force (uses mass)</td>
<td>1</td>
</tr>
<tr>
<td>Acceleration (ignores mass)</td>
<td>2</td>
</tr>
<tr>
<td>Impulse (uses mass)</td>
<td>3</td>
</tr>
<tr>
<td>Velocity Change (ignores mass)</td>
<td>4</td>
</tr>
</table>
</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">flip()</font></td>
<td><a class="anchor" name="flip"></a>Flips this Object.</td>
</tr>
<tr>
<td><font face="monospace"><a href="http://berserk-games.com/knowledgebase/vector">Vector</a>
</font></td>
<td><font face="monospace">getAngularVelocity()</font></td>
<td><a class="anchor" name="getAngularVelocity"></a>Returns the current angular velocity vector of the Object.</td>
</tr>
<tr>
<td><font face="monospace">Table</a>
</font></td>
<td><font face="monospace">getBounds()</font></td>
<td><a class="anchor" name="getBounds"></a>Returns the world space axis aligned Bounds of the Object.<table>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
<tr>
<td><a href="http://berserk-games.com/knowledgebase/vector">Vector</a></td>
<td>center</td>
<td>The center of the bounding box.</td>
</tr>
<tr>
<td><a href="http://berserk-games.com/knowledgebase/vector">Vector</a></td>
<td>size</td>
<td>The size of the bounding box.</td>
</tr>
<tr>
<td><a href="http://berserk-games.com/knowledgebase/vector">Vector</a></td>
<td>offset</td>
<td>The offset of the bounds center and the transform position.</td>
</tr>
</table>
</td>
</tr>
<tr>
<td><font face="monospace">Table</a>
</font></td>
<td><font face="monospace">getBoundsNormalized()</font></td>
<td><a class="anchor" name="getBoundsNormalized"></a>Returns the world space axis aligned Bounds of the Object at zero rotation.<table>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
<tr>
<td><a href="http://berserk-games.com/knowledgebase/vector">Vector</a></td>
<td>center</td>
<td>The center of the bounding box.</td>
</tr>
<tr>
<td><a href="http://berserk-games.com/knowledgebase/vector">Vector</a></td>
<td>size</td>
<td>The size of the bounding box.</td>
</tr>
<tr>
<td><a href="http://berserk-games.com/knowledgebase/vector">Vector</a></td>
<td>offset</td>
<td>The offset of the bounds center and the transform position.</td>
</tr>
</table>
</td>
</tr>
<tr>
<td><font face="monospace"><a href="http://berserk-games.com/knowledgebase/vector">Vector</a></font></td>
<td><font face="monospace">getPosition()</font></td>
<td><a class="anchor" name="getPosition"></a>Gets the position for this Object.</td>
</tr>
<tr>
<td><font face="monospace"><a href="http://berserk-games.com/knowledgebase/vector">Vector</a></font></td>
<td><font face="monospace">getRotation()</font></td>
<td><a class="anchor" name="getRotation"></a>Gets the rotation of this Object in degrees.</td>
</tr>
<tr>
<td><font face="monospace"><a href="http://berserk-games.com/knowledgebase/vector">Vector</a></font></td>
<td><font face="monospace">getScale()</font></td>
<td><a class="anchor" name="getScale"></a>Gets the scale for this Object.</td>
</tr>
<tr>
<td><font face="monospace"><a href="http://berserk-games.com/knowledgebase/vector">Vector</a></font></td>
<td><font face="monospace">getTransformForward()</font></td>
<td><a class="anchor" name="getTransformForward"></a>Gets the forward direction of this Object.</td>
</tr>
<tr>
<td><font face="monospace"><a href="http://berserk-games.com/knowledgebase/vector">Vector</a></font></td>
<td><font face="monospace">getTransformRight()</font></td>
<td><a class="anchor" name="getTransformRight"></a>Gets the right direction of this Object.</td>
</tr>
<tr>
<td><font face="monospace"><a href="http://berserk-games.com/knowledgebase/vector">Vector</a></font></td>
<td><font face="monospace">getTransformUp()</font></td>
<td><a class="anchor" name="getTransformUp"></a>Gets the up direction of this Object.</td>
</tr>
<tr>
<td><font face="monospace"><a href="http://berserk-games.com/knowledgebase/vector">Vector</a></font></td>
<td><font face="monospace">getVelocity()</font></td>
<td><a class="anchor" name="getVelocity"></a>Returns the current velocity vector of the Object.</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">isSmoothMoving()</font></td>
<td><a class="anchor" name="isSmoothMoving"></a>Is the object smoothly moving from our smooth functions.</td>
</tr>
<tr>
<td><font face="monospace"><a href="http://berserk-games.com/knowledgebase/vector">Vector</a></font></td>
<td><font face="monospace">positionToLocal(<a href="http://berserk-games.com/knowledgebase/vector">Vector</a>)</font></td>
<td><a class="anchor" name="positionToLocal"></a>Converts the world position to a local position of this Object.</td>
</tr>
<tr>
<td><font face="monospace"><a href="http://berserk-games.com/knowledgebase/vector">Vector</a></font></td>
<td><font face="monospace">positionToWorld(<a href="http://berserk-games.com/knowledgebase/vector">Vector</a>)</font></td>
<td><a class="anchor" name="positionToWorld"></a>Converts the local position of this Object to a world position.</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">rotate(<a href="http://berserk-games.com/knowledgebase/vector">Vector</a>)</font></td>
<td><a class="anchor" name="rotate"></a>Smoothly rotates this Object with the given offset in degrees, i.e. rotate Object 90 degrees in the x direction from its current orientation.</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">scale(<a href="http://berserk-games.com/knowledgebase/vector">Vector</a>)</font></td>
<td><a class="anchor" name="scale"></a>Scales this Object by the given amount.</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">scale(float scale)</font></td>
<td><a class="anchor" name="scaleAllAxes"></a>Scales this Object in all axes by the given amount.</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">setAngularVelocity(<a href="http://berserk-games.com/knowledgebase/vector">Vector</a>)</font></td>
<td><a class="anchor" name="setAngularVelocity"></a>Sets the angular velocity of the object.</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">setPosition(<a href="http://berserk-games.com/knowledgebase/vector">Vector</a>)</font></td>
<td><a class="anchor" name="setPosition"></a>Sets the world space position for this Object.</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">setPositionSmooth(<a href="http://berserk-games.com/knowledgebase/vector">Vector</a>, bool Collide = false, bool Fast = false)</font></td>
<td><a class="anchor" name="setPositionSmooth"></a>Smoothly moves this Object from its current position to a given world space position. If there is a collision the object will be instantly teleported to the location.</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">setRotation(<a href="http://berserk-games.com/knowledgebase/vector">Vector</a>)</font></td>
<td><a class="anchor" name="setRotation"></a>Sets the rotation of this Object in degrees.</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">setRotationSmooth(<a href="http://berserk-games.com/knowledgebase/vector">Vector</a>, bool Collide = false, bool Fast = false)</font></td>
<td><a class="anchor" name="setRotationSmooth"></a>Smoothly rotates this Object to the given orientation in degrees.</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">setScale(<a href="http://berserk-games.com/knowledgebase/vector">Vector</a>)</font></td>
<td><a class="anchor" name="setScale"></a>Sets the scale for this Object.</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">setVelocity(<a href="http://berserk-games.com/knowledgebase/vector">Vector</a>)</font></td>
<td><a class="anchor" name="setVelocity"></a>Sets the velocity of the object.</td>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">translate(<a href="http://berserk-games.com/knowledgebase/vector">Vector</a>)</font></td>
<td><a class="anchor" name="translate"></a>Smoothly moves this Object from its current position to a given offset.</td>
</tr>
</table>
<a class="anchor" name="Material Properties"></a>
<table width="100%">
<caption><strong><h3>Material Properties</h3></strong></caption>
<tr>
<th class="table_column_rv">Return Value</th>
<th class="table_column_fn">Function Name</th>
<th>Description</th>
</tr>
<tr>
<td><font face="monospace"><a href="http://berserk-games.com/knowledgebase/color">Color</a></font></td>
<td><font face="monospace">getColorTint()</font></td>
<td><a class="anchor" name="getColorTint"></a>Returns the color tint for this Object.</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">setColorTint(<a href="http://berserk-games.com/knowledgebase/color">Color</a>)</font></td>
<td><a class="anchor" name="setColorTint"></a>Sets the color tint for this Object.</td>
</tr>
</table>
<a class="anchor" name="UI Functions"></a>
<table width="100%">
<caption><strong><h3>UI Functions</h3></strong></caption>
<tr>
<th class="table_column_rv">Return Value</th>
<th class="table_column_fn">Function Name</th>
<th>Description</th>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">clearButtons()</font></td>
<td><a class="anchor" name="clearButtons"></a>Clears all 3D UI buttons on this Object.</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">clearInputs()</font></td>
<td><a class="anchor" name="clearInputs"></a>Clears all 3D UI inputs on this Object.</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">createButton(Table parameters)</font></td>
<td>
<a class="anchor" name="createButton"></a>Creates a 3D UI button on this Object.
<br />Parameters Table:
<br /><font face="monospace">
local button_parameters = {}<br />
button_parameters.click_function = string function_name<br />
button_parameters.function_owner = Object function_owner<br />
button_parameters.label = string button_label <font color="#3d8b40">--Optional</font><br />
button_parameters.position = <a href="http://berserk-games.com/knowledgebase/vector">Vector</a> <font color="#3d8b40">--Optional</font><br />
button_parameters.rotation = <a href="http://berserk-games.com/knowledgebase/vector">Vector</a> <font color="#3d8b40">--Optional</font><br />
button_parameters.scale = <a href="http://berserk-games.com/knowledgebase/vector">Vector</a> <font color="#3d8b40">--Optional</font><br />
button_parameters.width = int width <font color="#3d8b40">--Optional</font><br />
button_parameters.height = int height <font color="#3d8b40">--Optional</font><br />
button_parameters.font_size = int font_size <font color="#3d8b40">--Optional</font><br />
button_parameters.color = <a href="http://berserk-games.com/knowledgebase/color">Color</a> <font color="#3d8b40">--Optional</font><br />
button_parameters.font_color = <a href="http://berserk-games.com/knowledgebase/color">Color</a> <font color="#3d8b40">--Optional</font><br />
button_parameters.tooltip = string tooltip <font color="#3d8b40">--Optional</font><br />
button_parameters.alignment = int (1 = Automatic, 2 = Left, 3 = Center, 4 = Right, 5 = Justified) <font color="#3d8b40">--Optional</font><br />
</font><br />
A <font face="monospace">nil</font> value for funtion_owner means the function lives on the Global script.<br />
The click_function runs with optional parameters: click_function(Object objectButtonClicked, string playerColorClicked).
</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">createInput(Table parameters)</font></td>
<td>
<a class="anchor" name="createInput"></a>Creates a 3D UI input on this Object.
<br />Parameters Table:
<br /><font face="monospace">
local input_parameters = {}<br />
input_parameters.input_function = string function_name<br />
input_parameters.function_owner = Object function_owner<br />
input_parameters.label = string button_label <font color="#3d8b40">--Optional</font><br />
input_parameters.position = <a href="http://berserk-games.com/knowledgebase/vector">Vector</a> <font color="#3d8b40">--Optional</font><br />
input_parameters.rotation = <a href="http://berserk-games.com/knowledgebase/vector">Vector</a> <font color="#3d8b40">--Optional</font><br />
input_parameters.scale = <a href="http://berserk-games.com/knowledgebase/vector">Vector</a> <font color="#3d8b40">--Optional</font><br />
input_parameters.width = int width <font color="#3d8b40">--Optional</font><br />
input_parameters.height = int height <font color="#3d8b40">--Optional</font><br />
input_parameters.font_size = int font_size <font color="#3d8b40">--Optional</font><br />
input_parameters.color = <a href="http://berserk-games.com/knowledgebase/color">Color</a> <font color="#3d8b40">--Optional</font><br />
input_parameters.font_color = <a href="http://berserk-games.com/knowledgebase/color">Color</a> <font color="#3d8b40">--Optional</font><br />
input_parameters.tooltip = string tooltip <font color="#3d8b40">--Optional</font><br />
input_parameters.alignment = int (1 = Automatic, 2 = Left, 3 = Center, 4 = Right, 5 = Justified) <font color="#3d8b40">--Optional</font><br />
input_parameters.value = string input_value <font color="#3d8b40">--Optional</font><br />
input_parameters.validation = int (1 = None, 2 = Integer, 3 = Float, 4 = Alphanumeric, 5 = Username, 6 = Name) <font color="#3d8b40">--Optional</font><br />
input_parameters.tab = int (1 = None, 2 = Select Next, 3 = Indent) <font color="#3d8b40">--Optional</font><br />
</font><br />
A <font face="monospace">nil</font> value for funtion_owner means the function lives on the Global script. <br />
The input_function runs with optional parameters: input_function(Object objectInputTyped, string playerColorTyped, string input_value, bool selected). Can return string in Callback to overwrite input value. Callback fires every time the input is typed in or deselected.
</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">editButton(Table parameters)</font></td>
<td>
<a class="anchor" name="editButton"></a>Edits a 3D UI button on this Object based on its index.
<br />Parameter Table:
<br /><font face="monospace">
local button_parameters = {}<br />
button_parameters.index = int index<br />
button_parameters.click_function = string function_name <font color="#3d8b40">--Optional</font><br />
button_parameters.function_owner = Object function_owner <font color="#3d8b40">--Optional</font><br />
button_parameters.label = string button_label <font color="#3d8b40">--Optional</font><br />
button_parameters.position = <a href="http://berserk-games.com/knowledgebase/vector">Vector</a> <font color="#3d8b40">--Optional</font><br />
button_parameters.rotation = <a href="http://berserk-games.com/knowledgebase/vector">Vector</a> <font color="#3d8b40">--Optional</font><br />
button_parameters.scale = <a href="http://berserk-games.com/knowledgebase/vector">Vector</a> <font color="#3d8b40">--Optional</font><br />
button_parameters.width = int width <font color="#3d8b40">--Optional</font><br />
button_parameters.height = int height <font color="#3d8b40">--Optional</font><br />
button_parameters.font_size = int font_size <font color="#3d8b40">--Optional</font><br />
button_parameters.color = <a href="http://berserk-games.com/knowledgebase/color">Color</a> <font color="#3d8b40">--Optional</font><br />
button_parameters.font_color = <a href="http://berserk-games.com/knowledgebase/color">Color</a> <font color="#3d8b40">--Optional</font><br />
button_parameters.tooltip = string tooltip <font color="#3d8b40">--Optional</font><br />
button_parameters.alignment = int (1 = Automatic, 2 = Left, 3 = Center, 4 = Right, 5 = Justified) <font color="#3d8b40">--Optional</font><br />
</font>
</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">editInput(Table parameters)</font></td>
<td>
<a class="anchor" name="editInput"></a>Edits a 3D UI input on this Object based on its index.
<br />Parameter Table:
<br /><font face="monospace">
local input_parameters = {}<br />
input_parameters.index = int index<br />
input_parameters.input_function = string function_name <font color="#3d8b40">--Optional</font><br />
input_parameters.function_owner = Object function_owner <font color="#3d8b40">--Optional</font><br />
input_parameters.label = string button_label <font color="#3d8b40">--Optional</font><br />
input_parameters.position = <a href="http://berserk-games.com/knowledgebase/vector">Vector</a> <font color="#3d8b40">--Optional</font><br />
input_parameters.rotation = <a href="http://berserk-games.com/knowledgebase/vector">Vector</a> <font color="#3d8b40">--Optional</font><br />
input_parameters.scale = <a href="http://berserk-games.com/knowledgebase/vector">Vector</a> <font color="#3d8b40">--Optional</font><br />
input_parameters.width = int width <font color="#3d8b40">--Optional</font><br />
input_parameters.height = int height <font color="#3d8b40">--Optional</font><br />
input_parameters.font_size = int font_size <font color="#3d8b40">--Optional</font><br />
input_parameters.color = <a href="http://berserk-games.com/knowledgebase/color">Color</a> <font color="#3d8b40">--Optional</font><br />
input_parameters.font_color = <a href="http://berserk-games.com/knowledgebase/color">Color</a> <font color="#3d8b40">--Optional</font><br />
input_parameters.tooltip = string tooltip <font color="#3d8b40">--Optional</font><br />
input_parameters.alignment = int (1 = Automatic, 2 = Left, 3 = Center, 4 = Right, 5 = Justified) <font color="#3d8b40">--Optional</font><br />
input_parameters.value = string input_value <font color="#3d8b40">--Optional</font><br />
input_parameters.validation = int (1 = None, 2 = Integer, 3 = Float, 4 = Alphanumeric, 5 = Username, 6 = Name) <font color="#3d8b40">--Optional</font><br />
input_parameters.tab = int (1 = None, 2 = Select Next, 3 = Indent) <font color="#3d8b40">--Optional</font><br />
</font>
</td>
</tr>
<tr>
<td><font face="monospace">Table</font></td>
<td><font face="monospace">getButtons()</font></td>
<td>
<a class="anchor" name="getButtons"></a>Gets a list of all the 3D UI buttons on this Object.
<br />Returned Table:
<br /><font face="monospace">
table.index = int index <font color="#3d8b40">--The index of this button as a child of the Object. Used for editing or removing this specific button.</font><br />
table.click_function = string click_function<br />
table.function_owner = Object function_owner<br />
table.label = string label_text<br />
table.position = Table position <font color="#3d8b40">--{x, y, z}</font><br />
table.rotation = Table rotation <font color="#3d8b40">--{x, y, z}</font><br />
table.scale = Table scale<font color="#3d8b40">--{x, y, z}</font><br />
table.width = int button_width<br />
table.height = int button_height<br />
table.font_size = int font_size<br />
table.color = <a href="http://berserk-games.com/knowledgebase/color">Color</a><br />
table.font_color = <a href="http://berserk-games.com/knowledgebase/color">Color</a><br />
table.tooltip = string tooltip
table.alignment = int (1 = Automatic, 2 = Left, 3 = Center, 4 = Right, 5 = Justified)
</font>
</td>
</tr>
<tr>
<td><font face="monospace">Table</font></td>
<td><font face="monospace">getInputs()</font></td>
<td>
<a class="anchor" name="getInputs"></a>Gets a list of all the 3D UI inputs on this Object.
<br />Returned Table:
<br /><font face="monospace">
table.index = int index <font color="#3d8b40">--The index of this button as a child of the Object. Used for editing or removing this specific button.</font><br />
table.click_function = string click_function<br />
table.function_owner = Object function_owner<br />
table.label = string label_text<br />
table.position = Table position <font color="#3d8b40">--{x, y, z}</font><br />
table.rotation = Table rotation <font color="#3d8b40">--{x, y, z}</font><br />
table.scale = Table scale<font color="#3d8b40">--{x, y, z}</font><br />
table.width = int button_width<br />
table.height = int button_height<br />
table.font_size = int font_size<br />
table.color = <a href="http://berserk-games.com/knowledgebase/color">Color</a><br />
table.font_color = <a href="http://berserk-games.com/knowledgebase/color">Color</a><br />
table.tooltip = string tooltip
table.alignment = int (1 = Automatic, 2 = Left, 3 = Center, 4 = Right, 5 = Justified)
table.value = string input_value
table.validation = int (1 = None, 2 = Integer, 3 = Float, 4 = Alphanumeric, 5 = Username, 6 = Name)
</font>
</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">removeButton(int index)</font></td>
<td><a class="anchor" name="removeButton"></a>Removes a 3D UI button from this Object by its index.</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">removeInput(int index)</font></td>
<td><a class="anchor" name="removeInput"></a>Removes a 3D UI input from this Object by its index.</td>
</tr>
</table>
<a class="anchor" name="Object Functions"></a>
<table width="100%">
<caption><strong><h3>Object Functions</h3></strong></caption>
<tr>
<th class="table_column_rv">Return Value</th>
<th class="table_column_fn">Function Name</th>
<th>Description</th>
</tr>
<tr>
<td><font face="monospace">variable</font></td>
<td><font face="monospace">call(string function_name, Table function_parameters)</font></td>
<td><a class="anchor" name="call"></a>Calls a Lua function owned by this Object and passes an optional Table as parameters to the function.</td>
</tr>
<tr>
<td><font face="monospace">Object</font></td>
<td><font face="monospace">clone(Table parameters)</font></td>
<td>
<a class="anchor" name="clone"></a>Copies and pastes this Object. Returns a reference to the newly spawned Object.
<br />Parameters Table:
<font face="monospace">
local params = {}<br />
params.position = <a href="http://berserk-games.com/knowledgebase/vector">Vector</a> <font color="#3d8b40">--Optional. Where to spawn the pasted Object. Defaults to {0, 3, 0}.</font><br />
params.snap_to_grid = boolean snap_to_grid <font color="#3d8b40">--Optional. Should the spawned Object snap to the grid if the grid is turned on? Defaults to false.</font><br />
</font>
</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">cut()</font></td>
<td><a class="anchor" name="cut"></a>Cuts this Object if it is a Deck or a Stack</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">deal(int number, string <a href="http://berserk-games.com/knowledgebase/player-colors/">player_color</a> <font color="#3d8b40">--Optional.</font>, int hand_index <font color="#3d8b40">--Optional.</font>)</font></td>
<td><a class="anchor" name="deal"></a>Deals object to player's hand. Will deal from deck, bag, infinite bag, chips, and individual objects to hands. If no <a href="http://berserk-games.com/knowledgebase/player-colors/">player_color</a> supplied it will deal to all seated players.</td>
</tr>
<tr>
<td><font face="monospace">Object</font></td>
<td><font face="monospace">dealToColorWithOffset(<a href="http://berserk-games.com/knowledgebase/vector">Vector</a>, bool flip, string <a href="http://berserk-games.com/knowledgebase/player-colors/">player_color</a>)</font></td>
<td><a class="anchor" name="dealToColorWithOffset"></a>Deals a Card to a player with an offset from their hand. Set the offset to 0 to deal in their hand. Returns a reference to the dealt Card.</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">destruct()</font></td>
<td><a class="anchor" name="destruct"></a>Destroys this Object. Mainly so you can call <font face="monospace">self.destruct().</font></td>
</tr>
<tr>
<td><font face="monospace">Table</font></td>
<td><font face="monospace">getCustomObject()</font></td>
<td>
<a class="anchor" name="getCustomObject"></a>Returns the custom parameters on a Custom Object. Custom Decks return a list of these values.
<table>
<caption>Returned Table</caption>
<tr>
<th>Key</th>
<th>Type</th>
<th>Description</th>
</tr>
<tr>
<td><font face="monospace">image</font></td>
<td><font face="monospace">string</font></td>
<td>Image URL for Custom Board, Custom Dice, Custom Figurine, Custom Tile, and Custom Token.</td>
</tr>
<tr>
<td><font face="monospace">image_secondary</font></td>
<td><font face="monospace">string</font></td>
<td>Secondary / Back Image URL for Custom Figurine or Custom Tile.</td>
</tr>
<tr>
<td><font face="monospace">type</font></td>
<td><font face="monospace">int</font></td>
<td>The number of sides of the Custom Dice, the shape of the Custom Tile, the type of Custom Mesh, or the type of Custom AssetBundle.</td>
</tr>
<tr>
<td><font face="monospace">thickness</font></td>
<td><font face="monospace">float</font></td>
<td>Thickness of the Custom Tile or Custom Token.</td>
</tr>
<tr>
<td><font face="monospace">stackable</font></td>
<td><font face="monospace">bool</font></td>
<td>Is this Custom Tile or Custom Token stackable?</td>
</tr>
<tr>
<td><font face="monospace">merge_distance</font></td>
<td><font face="monospace">float</font></td>
<td>The accuracy of the Custom Tile to it's base image.</td>
</tr>
<tr>
<td><font face="monospace">mesh</font></td>
<td><font face="monospace">string</font></td>
<td>Mesh URL for the Custom Mesh.</td>
</tr>
<tr>
<td><font face="monospace">diffuse</font></td>
<td><font face="monospace">string</font></td>
<td>Diffuse image URL for the Custom Mesh.</td>
</tr>
<tr>
<td><font face="monospace">normal</font></td>
<td><font face="monospace">string</font></td>
<td>Normal image URL for the Custom Mesh.</td>
</tr>
<tr>
<td><font face="monospace">collider</font></td>
<td><font face="monospace">string</font></td>
<td>Collider URL for the Custom Mesh.</td>
</tr>
<tr>
<td><font face="monospace">convex</font></td>
<td><font face="monospace">bool</font></td>
<td>Is this Custom Mesh concave?</td>
</tr>
<tr>
<td><font face="monospace">material</font></td>
<td><font face="monospace">int</font></td>
<td>The material for the Custom Mesh or Custom AssetBundle.</td>
</tr>
<tr>
<td><font face="monospace">specular_intensity</font></td>
<td><font face="monospace">float</font></td>
<td>The specular intensity for the Custom Mesh.</td>
</tr>
<tr>
<td><font face="monospace">specular_color</font></td>
<td><font face="monospace">Table</font></td>
<td>The specular color for the Custom Mesh.</td>
</tr>
<tr>
<td><font face="monospace">specular_sharpness</font></td>
<td><font face="monospace">float</font></td>
<td>The specular sharpness for the Custom Mesh.</td>
</tr>
<tr>
<td><font face="monospace">fresnel_strength</font></td>
<td><font face="monospace">float</font></td>
<td>The fresnel strength for the Custom Mesh.</td>
</tr>
<tr>
<td><font face="monospace">cast_shadows</font></td>
<td><font face="monospace">bool</font></td>
<td>Does this Custom Mesh cast shadows?</td>
</tr>
<tr>
<td><font face="monospace">assetbundle</font></td>
<td><font face="monospace">string</font></td>
<td>AssetBundle URL for this Custom AssetBundle.</td>
</tr>
<tr>
<td><font face="monospace">assetbundle_secondary</font></td>
<td><font face="monospace">string</font></td>
<td>Secondary AssetBundle URL for this Custom AssetBundle.</td>
</tr>
<tr>
<td><font face="monospace">face</font></td>
<td><font face="monospace">string</font></td>
<td>Face URL for this Custom Deck.</td>
</tr>
<tr>
<td><font face="monospace">unique_back</font></td>
<td><font face="monospace">bool</font></td>
<td>Unique back for this Custom Deck.</td>
</tr>
<tr>
<td><font face="monospace">back</font></td>
<td><font face="monospace">string</font></td>
<td>Back URL for this Custom Deck.</td>
</tr>
<tr>
<td><font face="monospace">width</font></td>
<td><font face="monospace">int</font></td>
<td>Width for this Custom Deck.</td>
</tr>
<tr>
<td><font face="monospace">height</font></td>
<td><font face="monospace">int</font></td>
<td>Height for this Custom Deck.</td>
</tr>
<tr>
<td><font face="monospace">number</font></td>
<td><font face="monospace">int</font></td>
<td>Number of cards for this Custom Deck.</td>
</tr>
<tr>
<td><font face="monospace">sideways</font></td>
<td><font face="monospace">bool</font></td>
<td>Sideways for this Custom Deck.</td>
</tr>
<tr>
<td><font face="monospace">back_is_hidden</font></td>
<td><font face="monospace">bool</font></td>
<td>Back is hidden for this Custom Deck.</td>
</tr>
</table>
</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">getLock()</font></td>
<td><a class="anchor" name="getLock"></a>Get the lock status of this object.</font></td>
</tr>
<tr>
<td><font face="monospace">Table</font></td>
<td><font face="monospace">getObjects()</font></td>
<td>
<a class="anchor" name="getObjects"></a>Returns all the Objects inside of this container.<br />
<table>
<tr>
<th>Object</th>
<th>Returned Data</th>
</tr>
<tr>
<td>Scripting Zone</td>
<td>Returns all Objects in the Zone.</td>
</tr>
<tr>
<td>Loot Bag</td>
<td>Returns a Table with the keys "name", "guid", and "index". Objects in Loot Bags are not living in the game. They're serialized into a text format. To interact with or change an Object in a Loot Bag, it must first be taken out (which spawns it in the game). Objects in Loot Bags can be taken out of the Bag by the <font face="monospace">takeObject</font> function by referencing its "index" or "guid". It's recommended to remove Objects by their GUIDs rather than their indices since the indices can change after one object was removed.</td>
</tr>
<tr>
<td>Deck</td>
<td>Returns a Table of Tables of all of the Cards in the Deck. These are not references to the cards since the Cards are not instantiated until they are removed from the Deck.
<br />Card Table:
<br /><font face="monospace">
table.index = int index<br />
table.nickname = string nickname<br />
table.description = string description<br />
table.guid = string guid<br />
table.lua_script = string lua_script<br />
</font>
</tr>
</table>
</td>
</tr>
<tr>
<td><font face="monospace">int</font></td>
<td><font face="monospace">getQuantity()</font></td>
<td><a class="anchor" name="getQuantity"></a>Returns the number of Objects in a stack. Will return -1 if the object is not a stack.</td>
</tr>
<tr>
<td><font face="monospace">Table</font></td>
<td><font face="monospace">getRotationValues()</font></td>
<td><a class="anchor" name="getRotationValues"></a>Returns the rotation values for this Object just like the Gizmo -> Rotation Value tool. List of Tables with Keys: "value" and "rotation".</td>
</tr>
<tr>
<td><font face="monospace">int</font></td>
<td><font face="monospace">getStateId()</font></td>
<td><a class="anchor" name="getStateId"></a>Returns id of the active state for this object. Will return -1 if the object has no states.</td>
</tr>
<tr>
<td><font face="monospace">Table</font></td>
<td><font face="monospace">getStates()</font></td>
<td><a class="anchor" name="getStates"></a>Returns a Table with the keys "name", "guid", and "id".</td>
</tr>
<tr>
<td><font face="monospace">int</font></td>
<td><font face="monospace">getValue()</font></td>
<td>
<a class="anchor" name="getValue"></a>Returns the value for this Object.
<table>
<tr>
<th>Object</th>
<th>Value</th>
</tr>
<tr>
<td><a href="http://berserk-games.com/knowledgebase/clock">Clock</a></td>
<td>Returns the current stopwatch or timer value.</td>
</tr>
<tr>
<td><a href="http://berserk-games.com/knowledgebase/counter">Counter</a></td>
<td>Returns the value.</td>
</tr>
<tr>
<td>Rotation Value</td>
<td>Returns the face-up value index.</td>
</tr>
<tr>
<td>Hidden Zone</td>
<td>Return the <a href="http://berserk-games.com/knowledgebase/player-colors/">player_color</a> of the zone.</td>
</tr>
<tr>
<td>Poker Chip</td>
<td>Returns the face value.</td>
</tr>
<tr>
<td>Tablet</td>
<td>Returns the URL.</td>
</tr>
</table>
</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">highlightOn(<a href="http://berserk-games.com/knowledgebase/color">Color</a>, float duration <font color="#3d8b40">--Optional.</font><br />
)</font></td>
<td><a class="anchor" name="highlightOn"></a>Highlight this object with <a href="http://berserk-games.com/knowledgebase/color">Color</a> for an optional duration.</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">highlightOff()</font></td>
<td><a class="anchor" name="highlightOff"></a>Stop highlighting this object.</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">putObject(Object put_object)</font></td>
<td><a class="anchor" name="putObject"></a>Add this object to the current object. Works for stacking chips, decks, and bags.</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">randomize()</font></td>
<td><a class="anchor" name="randomize"></a>Same as pressing the ‘R’ key on an Object. Shuffles deck/bag, rolls dice/coin, lifts any other object up in the air.</td>
</tr>
<tr>
<td><font face="monospace">Object</font></td>
<td><font face="monospace">reload()</font></td>
<td><a class="anchor" name="reload"></a>Reloads this object by destroying and spawning it place. Returns the newly spawned object. Very useful if using <a href="#setCustomObject">setCustomObject()</a>.</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">reset()</font></td>
<td><a class="anchor" name="reset"></a>Resets this Object. Resetting a Deck brings all the Cards back into it. Resetting a Bag clears its contents (works for both Loot and Infinite Bags).</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">roll()</font></td>
<td><a class="anchor" name="roll"></a>Rolls this Object. Works on Dice and Coins.</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">setCustomObject(Table parameters)</font></td>
<td><a class="anchor" name="setCustomObject"></a>Used to create a Custom Object, if updating an already loaded object use <a href="#reload">reload()</a>. See <a href="http://berserk-games.com/knowledgebase/spawnable-objects/#Custom_Objects">here</a> for information about the parameters for each type of Custom Object.</td>
</tr>
<tr>
<td><font face="monospace">bool</font></td>
<td><font face="monospace">setLock(bool lock)</font></td>
<td><a class="anchor" name="setLock"></a>Set the lock status of an object.</td>
</tr>
<tr>