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
#15
RE: (Solved) GetPropIsInteractedWith not working?

Both the values are being initialized, but with the GetPropIsInteractedWith in a seperate timer, using an integer to control it instead (if I understand what you mean).

I did get it to work the way I wanted it to exactly. I just had to make a rather strange method to fix it.

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

void Impact2(string &in asParent, string &in asChild, int alState)
{
    float Time = (1.05f - GetTimerTimeLeft("ImpactTime"));
    float Speed = (Distance / Time); // Gets the speed
    
    if(Speed >= 0.2f && iInteractStoneIndex == 0)
    {

Derp.
(This post was last modified: 08-22-2015, 06:26 PM by Neelke.)
08-22-2015, 06:25 PM
Find


Messages In This Thread
RE: (Solved) GetPropIsInteractedWith not working? - by Neelke - 08-22-2015, 06:25 PM



Users browsing this thread: 1 Guest(s)