Frictional Games Forum (read-only)

Full Version: Script on potions
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible to activate a command(ex:playsound or spawn enemy) when player uses an potion(exConfusedanity potion)?
Really no one??
I don't think so. It would probably be pretty advanced coding, but I'm not sure.
(11-05-2012, 04:09 PM)Tigerwaw Wrote: [ -> ]I don't think so. It would probably be pretty advanced coding, but I'm not sure.
I think I found it by myself...But I don't really like my way...I would like to know if anyone has done it and how
No, i think it's been mentioned before. It's not possible. I guess your way was: Checking if the players health changes.
How about making a timer that checks if GetPlayerHealth is bigger than what it was 1 second ago?
(11-05-2012, 04:35 PM)beecake Wrote: [ -> ]No, i think it's been mentioned before. It's not possible. I guess your way was: Checking if the players health changes.
How about making a timer that checks if GetPlayerHealth is bigger than what it was 1 second ago?
That's a good theory but i thought what if the player's health is already 100???And it actually works like a sanity potion..I made a value set to 1 when the player picks the item and the checks if the player has the item so if the var is 1 and the player has used the item it changes the var to 0 and that's it...But I'm not sure how is it going to work when the player chooses to use the item in another map
Have the timer going in all the maps, checking the player sanity. And stop the timer with a GlobalVarInt when it is triggered. Or yea, make a timer that checks if the player has the item. Thats a good idea.