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 asEntity, int alState)
 {
    if(
alState == 1){
        for(
int i=6; i<=8;i++){ 
            
CreateParticleSystemAtEntity("ValveP"+i, "ps_steam.ps", "ValveParticles_"+i, true);
            
PlaySoundAtEntity("ValveS"+i, "13_steam", "ValveParticles_"+i, 0.5, true);
            
SetPropObjectStuckState("machine_valve_1", 1);
            
SetEntityInteractionDisabled("machine_valve_1", true);
            
PlaySoundAtEntity("", "lock_door.snt", "machine_valve_1", 0, true);
            
FadeLightTo("PointLight_6", 0,0,0,0, -1, 1.5f);
            
AddLocalVarInt("Valve", 1);
        }
    }
    else if (
alState == -1) AddDebugMessage("Valve Min", false);
 }

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