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
Making Puzzle Items Consumable
DRedshot Offline
Senior Member

Posts: 374
Threads: 23
Joined: Jun 2011
Reputation: 11
#6
RE: Making Puzzle Items Consumable

maybe try looping GetEntityExists("namehere") if it doesn't exist, assume it has been consumed.
for example
void OnPickup(string &in asEntity , string &in asType)
{
if(asType=="OnPickup"){ // Player has picked up the potion
AddTimer("EntityExists" , 0.1f , "DoesEntityExist");
}
}

void DoesEntityExist(string &in asTimer)
{
if (GetEntityExists("")){
// player hasn't drank the potion
AddTimer "loop" , 0.1f , "DoesEntityExist");
}

else {
// player has drank it! - remove the timers and end the loop! do what you want to do here!
}
}

08-15-2011, 04:40 PM
Find


Messages In This Thread
Making Puzzle Items Consumable - by Homicide13 - 08-15-2011, 02:09 AM
RE: Making Puzzle Items Consumable - by MrBigzy - 08-15-2011, 03:40 AM
RE: Making Puzzle Items Consumable - by DRedshot - 08-15-2011, 04:40 PM



Users browsing this thread: 1 Guest(s)