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


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help (Solved) GetPropIsInteractedWith not working?
Neelke Offline
Senior Member

Posts: 668
Threads: 82
Joined: Apr 2013
Reputation: 26
#10
RE: (Kinda Solved) GetPropIsInteractedWith not working?

Yeah, good idea. I'll update this comment after I've attempted it.

Ok, that actually did work. The debug message changed when its interacted with now. But I don't understand why the if-statement in the collide function did not work.

I think I solved it, but I had to do it in a method I didn't expect to use. I need to start a timer when entering the map constantly repeating and telling if stone is interacted, setting up an int variable.

int iInteractStoneIndex = 0;
void TimerUpdateInteraction(string &in asTimer)
{
    if(!GetPropIsInteractedWith("stone")) iInteractStoneIndex = 0;
    else iInteractStoneIndex = 1;
    
    AddTimer("loop", 0.0166f, "TimerUpdateInteraction");
}

And then I just use the variable in the if-statement.

if(Speed >= 0.2f && iInteractStoneIndex == 0)

Thanks alot Flawless for telling me to experiment with a timer Tongue

Derp.
(This post was last modified: 08-22-2015, 12:10 AM by Neelke.)
08-21-2015, 11:54 PM
Find


Messages In This Thread
RE: (Kinda Solved) GetPropIsInteractedWith not working? - by Neelke - 08-21-2015, 11:54 PM



Users browsing this thread: 1 Guest(s)