1/3/2024 0 Comments A township tale weapons![]() ![]() setMaterial() on them doesn't alter these prefabs. ![]() For example, some prefabs (such as the iron handles) simply don't have a material, and calling. In the end, the game server decides what is possible. setRotation(x, y, z, w) - Pass a quaternion to set the prefab's rotation. To "weld" a child prefab to a parent, you must make the child kinematic. Note that if prefabs are not kinematic, these coordinates are only used for spawning, after which physics will be simulated. For child prefabs these are local coordinates relative to the parent. For the parent prefab, these are world coordinates. setPosition(x, y, z) - Pass coordinates to set the prefab's position. Only works reliably on the parent prefab. setVelocity(x, y, z) - Pass a direction (vector) to the prefab, causing the physics engine to apply a force to it when spawning. Note that static prefabs such as walls cannot be added this way. addGift(prefab) - Pass a createPrefab() prefab to insert into a Gift_Mail_Box prefab. setGiftBoxLabel(string) - Pass a string to be shown on a Gift_Mail_Box prefab. You can optionally pass a boolean, for example. Not all prefabs are able to be set on fire. A sleeping prefab does not have its physics simulated until it receives a collision or force, such as touching it. ![]() By default, all prefabs created with createPrefab are not server sleeping. setServerSleeping() - Makes the prefab sleep. By default, all prefabs created with createPrefab are not kinematic, but some prefabs require to be kinematic to work properly. setKinematic() - Makes the prefab kinematic. ![]() setIntegrity(0.2) makes the prefab badly damaged (20% integrity). setIntegrity(number) - Pass a number between 0 (destroyed) and 1 (pristine). print() There are also some other interesting (but advanced) things we can do with prefabs. useSlot('Slot_Large_SwordType_Craft_1', guard) setMaterial('Mythril') +Ĭonst handle = createPrefab(Prefab.Handle_Short) + const blade = createPrefab(Prefab.Metal_Hebios_Wakizashi_Blade) +. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |