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
Script Help "Water Wheelpanel"
Alento Offline
Member

Posts: 64
Threads: 11
Joined: Jan 2012
Reputation: 0
#5
RE: "Water Wheelpanel"

(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

---------Want help with YOUR Custom Story? ---------
http://www.frictionalgames.com/forum/user-19049.html
(This post was last modified: 02-27-2012, 09:20 PM by Alento.)
02-27-2012, 08:47 PM
Find


Messages In This Thread
"Water Wheelpanel" - by Alento - 02-27-2012, 08:07 PM
RE: "Water Wheelpanel" - by SilentStriker - 02-27-2012, 08:16 PM
RE: "Water Wheelpanel" - by Alento - 02-27-2012, 08:17 PM
RE: "Water Wheelpanel" - by Your Computer - 02-27-2012, 08:33 PM
RE: "Water Wheelpanel" - by Alento - 02-27-2012, 08:47 PM



Users browsing this thread: 1 Guest(s)