10-24-2014, 07:44 PM
Pages: 1 2
10-24-2014, 07:48 PM
Hello olrik666
I guess you can find help in here:
https://wiki.frictionalgames.com/doku.ph...nd_buttons
I guess you can find help in here:
https://wiki.frictionalgames.com/doku.ph...nd_buttons
10-24-2014, 08:39 PM
I don't understand :/
My script :
void OnStart()
{
PreloadSound("17_steam.snt");
PreloadSound("unlock_door.snt");
SetLocalVarInt("Valve_iron1", 0);
}
void OnLeave()
{
SetupLoadScreen("Loading", "LoadScreen1", 0, "LoadScreenImage1.png");
}
/////////Interact
void unlockdoor(string &in asEntity, int alState)
{
if(alState == 1)
{
SetLevelDoorLocked("door_complex1", false);
PlaySoundAtEntity("", "unlock_door.snt", "door_complex1", 0, false);
PlaySoundAtEntity("", "17_steam.snt", "barrier", 0, false);
}
}
My script :
void OnStart()
{
PreloadSound("17_steam.snt");
PreloadSound("unlock_door.snt");
SetLocalVarInt("Valve_iron1", 0);
}
void OnLeave()
{
SetupLoadScreen("Loading", "LoadScreen1", 0, "LoadScreenImage1.png");
}
/////////Interact
void unlockdoor(string &in asEntity, int alState)
{
if(alState == 1)
{
SetLevelDoorLocked("door_complex1", false);
PlaySoundAtEntity("", "unlock_door.snt", "door_complex1", 0, false);
PlaySoundAtEntity("", "17_steam.snt", "barrier", 0, false);
}
}
10-25-2014, 12:40 PM
Try adding this in OnStart
PHP Code:
SetEntityConnectionStateChangeCallback("NameofyourwheelintheLeveleditor", "unlockdoor");
10-25-2014, 01:03 PM
As DnALANGE said add that code on "void OnStart()"
so it should looks like
And try using the spoiler it saves a lot of place in thread :P
like:[.spoiler]text[./spoiler] (without the dot) :D
so it should looks like
Spoiler below!
PHP Code:
void OnStart()
{
SetEntityConnectionStateChangeCallback("NameofyourwheelintheLeveleditor", "unlockdoor");
PreloadSound("17_steam.snt");
PreloadSound("unlock_door.snt");
SetLocalVarInt("Valve_iron1", 0);
}
void OnLeave()
{
SetupLoadScreen("Loading", "LoadScreen1", 0, "LoadScreenImage1.png");
}
/////////Interact
void unlockdoor(string &in asEntity, int alState)
{
if(alState == 1)
{
SetLevelDoorLocked("door_complex1", false);
PlaySoundAtEntity("", "unlock_door.snt", "door_complex1", 0, false);
PlaySoundAtEntity("", "17_steam.snt", "barrier", 0, false);
}
}
And try using the spoiler it saves a lot of place in thread :P
like:[.spoiler]text[./spoiler] (without the dot) :D
10-25-2014, 02:31 PM
I'm just here to reaffirm:
SetEntityConnectionStateChangeCallback("string entity name", "function name");
Whenever a valve changes state (from all the way off to all the way on, etc) it will trigger this function. I would remove the callback or put a check in the function to make sure it can't be repeated because that'll cause issues.
SetEntityConnectionStateChangeCallback("string entity name", "function name");
Whenever a valve changes state (from all the way off to all the way on, etc) it will trigger this function. I would remove the callback or put a check in the function to make sure it can't be repeated because that'll cause issues.
10-25-2014, 04:09 PM
Then this guy should fix this issue by doing this function IN the script itself ;
This will STUCK it''s state in
Burge4150, next time if you have an argument, please add the solution as well.
PHP Code:
SetWheelStuckState("YOURWheelName", 1, true);
Quote:orPHP Code:1
Quote:-PHP Code:-1
Burge4150, next time if you have an argument, please add the solution as well.
10-25-2014, 05:11 PM
Thanks you all guys it's work fine
10-25-2014, 05:32 PM
(10-25-2014, 05:11 PM)olrik666 Wrote: [ -> ]Thanks you all guys it's work fine
+Rep for me
You can give people kudo's \ reputatuion points for fun.
Only if you want to offcourse..
You dont have to do that now.
Just IF you want you can press on players name and REP + a small tekst for it.
For any other issues. be free to post them.
HINT; IF you have anything solved, please add SOLVED on your theeadh page.
So people do not have to go look into your "solved threadh"
10-25-2014, 06:40 PM
Glad i helped :P
Pages: 1 2