(02-27-2012, 08:33 PM)Your Computer Wrote: (02-27-2012, 08:17 PM)Alento Wrote: hm, The problem is, I've never used it, and I don't know how those works.
If you understand how script variables work, then that is all the knowledge you need to understand map variables.
Yeah, I read about it now, and, I think I understand it.
(02-27-2012, 08:33 PM)Your Computer Wrote: (02-27-2012, 08:17 PM)Alento Wrote: hm, The problem is, I've never used it, and I don't know how those works.
If you understand how script variables work, then that is all the knowledge you need to understand map variables.
void OnStart()
{
SetMultiSliderCallback("panel1", "set1");
SetMultiSliderCallback("panel2", "set2");
SetMultiSliderCallback("panel3", "set3");
AddTimer("SCheck", 0.1f, "CheckState");
SetGlobalVarInt("State", 0);
}
void set1(string &in asEntity, int alState)
{
if (asEntity == "panel1")
{
if(alState == 1){
AddGlobalVarInt("State", 1);
}
}
}
void set2(string &in asEntity, int alState)
{
if (asEntity == "panel2")
{
if(alState == -1){
AddGlobalVarInt("State", 1);
}
}
}
void set3(string &in asEntity, int alState)
{
if (asEntity == "panel3")
{
if(alState == 1){
AddGlobalVarInt("State", 1);
}
}
}
void CheckState(string &in asTimer)
{
if (GetGlobalVarInt("State") == 3)
{
InteractConnectPropWithMoveObject("","CheckState", "garage", true, false, 0);
}
}
Okey, this is my script now, should that probably work?
And if it should, I've got another problem... The panels are stuck at the smallest cogwheel, and can't be changed?? why? i have stuck state? In LevelEditor, the stuck state is on "0"?
Why is it stuck?! :S