You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
294 B
14 lines
294 B
function main() {
|
|
var color = Self.GetTag("color");
|
|
var quantity = color === "small" ? 1 : 0;
|
|
|
|
Events.OnCollide(function (e) {
|
|
if (e.Settled) {
|
|
if (e.Actor.HasInventory()) {
|
|
Sound.Play("item-get.wav")
|
|
e.Actor.AddItem(Self.Filename, quantity);
|
|
Self.Destroy();
|
|
}
|
|
}
|
|
})
|
|
}
|
|
|