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
Do something when wheel is on its limit
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#2
RE: Do something when wheel is on its limit

(11-30-2013, 03:46 PM)Neo Wrote: Hey there Smile

I've got a problem with the wheels again Confused I found out how to execute code when the player interacts with a valve or so, but then you just need to click on it one time, and I want to do something when you spin the wheel to the limit. Is it possible? :/ I haven't found a function for this yet...

It would be very kind if someone could help me Smile

here is an example you can copy paste:

///////OpenHeavyDoor///////
void OpenheavyDoor(string &in asEntity, int alState)
{
if(alState == 1) //Meaning wheel is "toutching" MAX
{
SetWheelStuckState("YOURWHEELNAME", 1, true); //Sets the wheel STUCK so you can't spin it anymore.
//STUFF YOU WANT TO HAPPEN IF WHEEL goes to MAX, can be empty if you only want something happen on MINUMUM.
}
if(alState == -1) //Meaning wheel is "toutching" MINIMUM
{
//STUFF YOU WANT TO HAPPEN IF WHEEL goes to MIMIMUM, can be empty if you only want something happen on MAX.
}
}

-----
void OpenheavyDoor(string &in asEntity, int alState)
The OpenheavyDoor copy paste this into your EDITOR -> YOURWHEEL -> ENTITIY-tab -> CONNECTCHANGESTATECALLBACK.

EXTRA EDIT:
// <-- If you remove those 2 slashes, that specific line will work, // is only for giving you an idea. so remove it if you want to use the function.
-
Have fun, if it didnt work, be free to ask here.
(This post was last modified: 11-30-2013, 07:27 PM by DnALANGE.)
11-30-2013, 07:18 PM
Find


Messages In This Thread
Do something when wheel is on its limit - by Neo - 11-30-2013, 03:46 PM
RE: Do something when wheel is on its limit - by DnALANGE - 11-30-2013, 07:18 PM



Users browsing this thread: 1 Guest(s)