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 AddLocalVarInt and valves problems
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#6
RE: AddLocalVarInt and valves problems

There must be a bug or something because Statyk tried it to and the same results, He got it working with using only SetLocalVar but not AddLocalVar... oh well here's my script

PHP Code: (Select All)
void OnStart();
{
    
SetLocalVarInt("Valve"0);
}
/*Turn Valves to direct steam
 */
 
void TurnStartSteam(string &in asEntityint alState)
 {
    if(
alState == 1){
        for(
int i=6i<=8;i++){ 
            
CreateParticleSystemAtEntity("ValveP"+i"ps_steam.ps""ValveParticles_"+itrue);
            
PlaySoundAtEntity("ValveS"+i"13_steam""ValveParticles_"+i0.5true);
            
SetPropObjectStuckState("machine_valve_1"1);
            
SetEntityInteractionDisabled("machine_valve_1"true);
            
PlaySoundAtEntity("""lock_door.snt""machine_valve_1"0true);
            
FadeLightTo("PointLight_6"0,0,0,0, -11.5f);
            
AddLocalVarInt("Valve"1);
        }
    }
    else if (
alState == -1AddDebugMessage("Valve Min"false);
 }

 
void TurnStartSteam2(string &in asEntityint alState)
 {
    if(
alState == 1){
        for(
int i=1i<=2;i++){
            
CreateParticleSystemAtEntity("ValveP"+i"ps_steam.ps""ValveParticles_"+itrue);
            
PlaySoundAtEntity("ValveS"+i"13_steam""ValveParticles_"+i0.5true);
            
SetPropObjectStuckState("machine_valve_2"1);
            
SetEntityInteractionDisabled("machine_valve_2"true);
            
PlaySoundAtEntity("""lock_door.snt""machine_valve_2"0true);
            
FadeLightTo("PointLight_7"0,0,0,0, -11.5f);
            
AddLocalVarInt("Valve"1);
        }
    }
    else if (
alState == -1AddDebugMessage("Valve Min"false);
 }
 
void TurnStartSteam3(string &in asEntityint alState)
 {
    if(
alState == 1){
        for(
int i=3i<=5;i++){
            
CreateParticleSystemAtEntity("ValveP"+i"ps_steam.ps""ValveParticles_"+itrue);
            
PlaySoundAtEntity("ValveS"+i"13_steam""ValveParticles_"+i0.5true);
            
SetPropObjectStuckState("machine_valve_3"1);
            
SetEntityInteractionDisabled("machine_valve_3"true);
            
PlaySoundAtEntity("""lock_door.snt""machine_valve_3"0true);
            
FadeLightTo("PointLight_8"0,0,0,0, -11.5f);
            
AddLocalVarInt("Valve"1);
        }
    }
    else if (
alState == -1AddDebugMessage("Valve Min"false);
 }
 
void TurnStartSteam4(string &in asEntityint alState)
 {
    if(
alState == 1){
        for(
int i=9i<=12;i++){
            
CreateParticleSystemAtEntity("ValveP"+i"ps_steam.ps""ValveParticles_"+itrue);
            
PlaySoundAtEntity("ValveS"+i"13_steam""ValveParticles_"+i0.5true);
            
SetPropObjectStuckState("machine_valve_4"1);
            
SetEntityInteractionDisabled("machine_valve_4"true);
            
PlaySoundAtEntity("""lock_door.snt""machine_valve_4"0true);
            
FadeLightTo("PointLight_9"0,0,0,0, -11.5f);
            
AddLocalVarInt("Valve"1);
        }
    }
    else if (
alState == -1AddDebugMessage("Valve Min"false);
 } 

All the other things work but not the LocalVarInt

02-16-2012, 08:21 AM
Find


Messages In This Thread
RE: AddLocalVarInt and valves problems - by SilentStriker - 02-16-2012, 08:21 AM
RE: AddLocalVarInt and valves problems - by jens - 02-16-2012, 09:28 AM
RE: AddLocalVarInt and valves problems - by jens - 02-16-2012, 11:41 AM



Users browsing this thread: 1 Guest(s)