Hello. I need help with changing world models.
For example i create world model of laptop:
worldModel.allowPickup = false;Code:DroppedItem worldModel = ItemManager.CreateByItemID(1490499512).Drop(player.transform.position, Vector3.zero).GetComponent<DroppedItem>(); worldModel.GetComponent<Rigidbody>().isKinematic = true; worldModel.GetComponent<Rigidbody>().useGravity = false
It's working, and when i am aiming at laptop, i see name of it. Can i change it? For example:
"PLAY".
Can i set command that will used if i will try to pick up that object? For example: /play?
Working with WorldModels
Discussion in 'Rust Development' started by HOUGAN_Y, May 20, 2017.
-
From what I am aware its not possible to change that name you see. Im sure you could draw 3d over it but besides that I don't think so. From what I can tell, that "Pickup" text you see if hard coded into the games. As seen in the WorldItem class.
-
Or calling function? -
Code:
void OnItemPickup(Item item, BasePlayer player) { Puts("OnItemPickup works!"); }
-
[DOUBLEPOST=1495311448][/DOUBLEPOST]
[DOUBLEPOST=1495311860][/DOUBLEPOST]- Called right after an item has been picked up - so, i need to make it BEFORE picking up. because i need to set static position for worldmodel
-
CanPickupEntity
or
OnCollectiblePickup
-