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
Item triggering a script
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#10
RE: Item triggering a script

which part doesn't work?
In case it's the health part:
PHP Code: (Select All)
void DaggerLoopCheck (string &in a):
If (
GetPlayerHealth() >99) { SetPlayerHealth=98.0f ;} //prevents regeneration
if (!HasItem("CustomDaggerItem")) { funcPlayerUsedTheItem; } //checks the item

AddTimer "dagger123""DaggerLoopCheck"); //loops itself
}

void funcPlayerUsedTheItem {
//code
RemoveTimer ("dagger123");


oh and you gotta make your custom item a Health Potion type in the model editor.

06-02-2016, 08:57 PM
Find


Messages In This Thread
Item triggering a script - by Darkfire - 05-24-2016, 09:58 PM
RE: Item triggering a script - by Slanderous - 05-25-2016, 10:57 PM
RE: Item triggering a script - by Mudbill - 05-26-2016, 07:08 AM
RE: Item triggering a script - by Darkfire - 05-26-2016, 12:20 PM
RE: Item triggering a script - by Darkfire - 05-30-2016, 04:00 PM
RE: Item triggering a script - by Slanderous - 05-30-2016, 04:20 PM
RE: Item triggering a script - by Daemian - 05-31-2016, 02:31 AM
RE: Item triggering a script - by Darkfire - 06-02-2016, 06:19 PM
RE: Item triggering a script - by Mudbill - 06-02-2016, 08:08 PM
RE: Item triggering a script - by Daemian - 06-02-2016, 08:57 PM
RE: Item triggering a script - by Mudbill - 06-02-2016, 11:19 PM
RE: Item triggering a script - by Daemian - 06-03-2016, 12:24 AM
RE: Item triggering a script - by Darkfire - 06-05-2016, 09:59 PM



Users browsing this thread: 3 Guest(s)