The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
Valve interaction
Josh707 Offline
Junior Member

Posts: 27
Threads: 5
Joined: Apr 2011
Reputation: 0
#1
Valve interaction

Hey everyone, I have set up my map with toggle-able light switches and I want to know how to make a valve turn on a heater. I have tried to do
SetEntityPlayerInteractCallback("heatervalve", "Turnonheater", true);

then

void Turnonheater(string &in entity)
{
    PlaySoundAtEntity("", "22_fire.snt", "geostove", 0, false);
    SetLampLit("bonfire", true, false);
}
But the stove turns on as soon as I touch the valve, not when it turns all the way... I have searched the script functions page for everything related to valves, interaction, wheels, buttons etc. and I have not found anything. How do I make it call a function when it's turned to the maximum?

tl;dr How do I make a valve call a function when I turn it all the way?

Try my custom story demo here!
Updated 23/04/11
(This post was last modified: 04-19-2011, 01:51 AM by Josh707.)
04-19-2011, 01:50 AM
Find


Messages In This Thread
Valve interaction - by Josh707 - 04-19-2011, 01:50 AM
RE: Valve interaction - by Anxt - 04-19-2011, 01:56 AM
RE: Valve interaction - by Josh707 - 04-19-2011, 02:00 AM
RE: Valve interaction - by Apjjm - 04-19-2011, 02:04 AM
RE: Valve interaction - by Anxt - 04-19-2011, 02:12 AM
RE: Valve interaction - by Josh707 - 04-19-2011, 02:14 AM
RE: Valve interaction - by Anxt - 04-19-2011, 02:27 AM
RE: Valve interaction - by Josh707 - 04-19-2011, 12:48 PM



Users browsing this thread: 1 Guest(s)