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
LocalVar and if-statements
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#4
RE: LocalVar and if-statements

It appears like:



void OnStart()

{

for(int i=1;i<=6;i++){

AddUseItemCallback("UsingOrbPieces", "orb_piece_"+i+"", "AreaUseOrbPiece","UseOrbPiecesOnArea", false);

}

}





///Using the orb pieces///

void UseOrbPiecesOnArea(string &in asItem, string &in asEntity)

{

if(GetLocalVarInt("AllMachineryUpAndRunning") == 5)

{

RemoveItem(asItem);

AddLocalVarInt("OrbPutTogether", 1);

OrbAllDoneLocal();



}

else if(GetLocalVarInt("AllMachineryUpAndRunning") == 0 && GetLocalVarInt("AllMachineryUpAndRunning") == 1 &&

GetLocalVarInt("AllMachineryUpAndRunning") == 2 &&
GetLocalVarInt("AllMachineryUpAndRunning") == 3 &&
GetLocalVarInt("AllMachineryUpAndRunning") == 4)

{

SetMessage("Descriptions", "Hint_15", 3.0f);

PlaySoundAtEntity("", "27_thump.snt", "Player", 0.1f, true);

}

}


Wait... what the heck? Anyway, you have a bigger script, right? If you have more from this machine, you should post it. Maybe the issue is somewhere else.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
11-25-2012, 12:29 AM
Find


Messages In This Thread
LocalVar and if-statements - by i3670 - 11-24-2012, 11:53 PM
RE: LocalVar and if-statements - by The chaser - 11-25-2012, 12:21 AM
RE: LocalVar and if-statements - by i3670 - 11-25-2012, 12:23 AM
RE: LocalVar and if-statements - by The chaser - 11-25-2012, 12:29 AM
RE: LocalVar and if-statements - by i3670 - 11-25-2012, 12:32 AM
RE: LocalVar and if-statements - by Your Computer - 11-25-2012, 12:40 AM
RE: LocalVar and if-statements - by i3670 - 11-25-2012, 12:47 AM
RE: LocalVar and if-statements - by Your Computer - 11-25-2012, 12:59 AM
RE: LocalVar and if-statements - by i3670 - 11-25-2012, 01:03 AM



Users browsing this thread: 2 Guest(s)