Is there a way to give a glow to something that's not an item? I'd like to trick a player into trying to pick up something. If giving it an item glow isn't possible, can I instead make an item fade away instead of going into the player's inventory when they interact with it?
void OnStart()
{
SetEntityPlayerInteractCallback("ITEMNAME", "OnInteract", true);
}
void OnInteract(string &in asEntity)
{
SetPropEffectActive("ITEMNAME", false, 1);
}
It'll just dissapear with that function though beecake, rather than a more aesthetically pleasing fade. You could try playing around with masking it with some PS
SetPropActiveAndFade(string& asName, bool abActive, float afFadeTime);
possibly?
It does fade away like it's supposed to, but it still goes into the player's inventory, which I'm trying to prevent.
RemoveItem(string& asName);
That still doesn't prevent the picking up sound and message, though.
(05-18-2012, 07:35 PM)Damascus Wrote: [ -> ]That still doesn't prevent the picking up sound and message, though.
I would guess you should use different scripts here...
Cover the item in a script area. Then you when you are close enough, and your crosshair is in the script area, make the script:
SetEntityCustomFocusCrossHair(string& asName, string& asCrossHair);
So the crosshair changes, but instead of picking it up you make it an interactcallback so the item disappears when you interacts with the script area.
Ah that one worked like a charm! Thank you very much!
No problem
