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 Script on potions
ZodiaC Offline
Member

Posts: 120
Threads: 8
Joined: Oct 2012
Reputation: 2
#1
Script on potions

Is it possible to activate a command(ex:playsound or spawn enemy) when player uses an potion(exConfusedanity potion)?

[Image: 2H1Mc.jpg]
11-04-2012, 09:01 PM
Find
ZodiaC Offline
Member

Posts: 120
Threads: 8
Joined: Oct 2012
Reputation: 2
#2
RE: Script on potions

Really no one??

[Image: 2H1Mc.jpg]
11-05-2012, 03:54 PM
Find
Tiger Away
Posting Freak

Posts: 1,874
Threads: 16
Joined: Nov 2012
Reputation: 55
#3
RE: Script on potions

I don't think so. It would probably be pretty advanced coding, but I'm not sure.
11-05-2012, 04:09 PM
Find
ZodiaC Offline
Member

Posts: 120
Threads: 8
Joined: Oct 2012
Reputation: 2
#4
RE: Script on potions

(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

[Image: 2H1Mc.jpg]
(This post was last modified: 11-05-2012, 04:16 PM by ZodiaC.)
11-05-2012, 04:14 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#5
RE: Script on potions

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?

Trying is the first step to success.
11-05-2012, 04:35 PM
Find
ZodiaC Offline
Member

Posts: 120
Threads: 8
Joined: Oct 2012
Reputation: 2
#6
RE: Script on potions

(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

[Image: 2H1Mc.jpg]
(This post was last modified: 11-05-2012, 04:51 PM by ZodiaC.)
11-05-2012, 04:50 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#7
RE: Script on potions

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.

Trying is the first step to success.
11-05-2012, 05:50 PM
Find




Users browsing this thread: 2 Guest(s)