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
#1
"Water Wheelpanel"

Okey, hi everyone!

This drives me crazy!.. I've been stuck at the same place for hours and days..

What I want is this panel ->
.png   Panel1.png (Size: 311.81 KB / Downloads: 189) + 2 more panels (same panel) to make an "safety door" to go up.

for example: I want the "Panel1" to , let's say, If "panel1" is on state 1, and "panel2" state 2 and finally "panel3" state on 0, the door will go up, else, it's closed..

I really trying to figure it out.. but it's very tricky, If you have any ideas, please help me out! Smile

PS. If any of this is not understandable, I'll try to explain more Tongue

Thank you!

---------Want help with YOUR Custom Story? ---------
http://www.frictionalgames.com/forum/user-19049.html
02-27-2012, 08:07 PM
Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#2
RE: "Water Wheelpanel"

try using localVars

02-27-2012, 08:16 PM
Find
Alento Offline
Member

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

(02-27-2012, 08:16 PM)SilentStriker Wrote: try using localVars
hm, The problem is, I've never used it, and I don't know how those works.

---------Want help with YOUR Custom Story? ---------
http://www.frictionalgames.com/forum/user-19049.html
02-27-2012, 08:17 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#4
RE: "Water Wheelpanel"

(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.

Tutorials: From Noob to Pro
02-27-2012, 08:33 PM
Website Find
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




Users browsing this thread: 2 Guest(s)