Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Item glow on non-item
Damascus Offline
Senior Member

Posts: 646
Threads: 118
Joined: Mar 2012
Reputation: 29
#1
Item glow on non-item

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?

(This post was last modified: 05-19-2012, 08:36 PM by Damascus.)
05-18-2012, 04:09 AM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#2
RE: Item glow on non-item

void OnStart()
{

SetEntityPlayerInteractCallback("ITEMNAME", "OnInteract", true);
}

void OnInteract(string &in asEntity)
{
SetPropEffectActive("ITEMNAME", false, 1);
}

Trying is the first step to success.
(This post was last modified: 05-18-2012, 10:00 AM by FlawlessHappiness.)
05-18-2012, 10:00 AM
Find
Adrianis Offline
Senior Member

Posts: 620
Threads: 6
Joined: Feb 2012
Reputation: 27
#3
RE: Item glow on non-item

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
05-18-2012, 05:19 PM
Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#4
RE: Item glow on non-item

SetPropActiveAndFade(string& asName, bool abActive, float afFadeTime);

possibly?

05-18-2012, 05:52 PM
Find
Damascus Offline
Senior Member

Posts: 646
Threads: 118
Joined: Mar 2012
Reputation: 29
#5
RE: Item glow on non-item

It does fade away like it's supposed to, but it still goes into the player's inventory, which I'm trying to prevent.

05-18-2012, 07:02 PM
Find
Unearthlybrutal Offline
Posting Freak

Posts: 775
Threads: 12
Joined: May 2011
Reputation: 26
#6
RE: Item glow on non-item

RemoveItem(string& asName);

When Life No Longer Exists
Full-conversion mod
05-18-2012, 07:08 PM
Website Find
Damascus Offline
Senior Member

Posts: 646
Threads: 118
Joined: Mar 2012
Reputation: 29
#7
RE: Item glow on non-item

That still doesn't prevent the picking up sound and message, though.

05-18-2012, 07:35 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#8
RE: Item glow on non-item

(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.

Trying is the first step to success.
05-19-2012, 01:44 PM
Find
Damascus Offline
Senior Member

Posts: 646
Threads: 118
Joined: Mar 2012
Reputation: 29
#9
RE: Item glow on non-item

Ah that one worked like a charm! Thank you very much!

05-19-2012, 08:35 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#10
RE: Item glow on non-item

No problem Wink

Trying is the first step to success.
05-20-2012, 09:22 AM
Find




Users browsing this thread: 2 Guest(s)