Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 32

Thread: Timed Door

  1. #21
    Private pollo's Avatar
    Join Date
    Jul 2012
    Location
    Spain
    Posts
    116
    Thanks
    93
    Thanked 69 Times in 35 Posts
    Replace the

    door2 waittill("rotatedone");

    to

    break;

    Like this:

    PHP Code:
    if(t==10)
            {
                
    door1 rotateyaw(90,2);
                
    door2 rotateyaw(-90,2);
                break;
            }
            
    t++;
            
    wait 60
    Also, you must finish each line with '';''

    Thats why you got the previous error xD
    Last edited by pollo; 9th March 2014 at 19:23.

  2. #22
    Private
    Join Date
    Jan 2014
    Posts
    38
    Thanks
    9
    Thanked 1 Time in 1 Post
    Ok, Pollo, but i changed my mind a little. A two door entrance is just so hard to get working properly, so i decided that only one of them will open so the castle will just be half opened

  3. #23
    Private
    Join Date
    Jan 2014
    Posts
    38
    Thanks
    9
    Thanked 1 Time in 1 Post
    But can i ask, what is the "if(t==10)" and "t++;" for?

  4. #24
    Private
    Join Date
    Jan 2014
    Posts
    38
    Thanks
    9
    Thanked 1 Time in 1 Post
    But I got some help by a friend, but i haven't heard from him in two days. The problem is still that the doors doesn't open at all, sot even a sign of it..

  5. #25
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by wannabe View Post
    But I got some help by a friend, but i haven't heard from him in two days. The problem is still that the doors doesn't open at all, sot even a sign of it..
    Check your target names. Make sure the code is detecting the right target name. The code itself is sound - it should work as intended.

  6. #26
    Private
    Join Date
    Jan 2014
    Posts
    38
    Thanks
    9
    Thanked 1 Time in 1 Post
    In radiant:
    Key: targetname
    Value: lol1
    In gsc-file:
    targetname and lol1 and lol2


    Nothing wrong as far i can see..
    Last edited by wannabe; 12th March 2014 at 17:31.

  7. #27
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    Show your gsc file

  8. #28
    Private
    Join Date
    Jan 2014
    Posts
    38
    Thanks
    9
    Thanked 1 Time in 1 Post
    The mp_hs.gsc:

    PHP Code:
    main()
    {
    maps\mp\_load::main();
    maps\mp\teleportenter::main();
    maps\mp\logo::main();
    maps\mp\castle::door();

    setExpFog(0.00010.550.60.550);
    // setCullFog(0, 16500, 0.55, 0.6, 0.55, 0);
    ambientPlay("ambient_france");

    game["allies"] = "american";
    game["axis"] = "german";
    game["attackers"] = "allies";
    game["defenders"] = "axis";
    game["american_soldiertype"] = "normandy";
    game["german_soldiertype"] = "normandy";

    setCvar("r_glowbloomintensity0"".25");
    setCvar("r_glowbloomintensity1"".25");
    setcvar("r_glowskybleedintensity0",".3");


    The "castle/door" file:

    PHP Code:
    door()
    {
        
    door1getent"lol1""targetname" );
        
    door2getent"lol2""targetname" );
        
    0;

        while( 
    true )
        {
            if(
    t==10)
            {
                
    door1 rotateyaw(90,2);
                
    door2 rotateyaw(-90,2);
                break;
            }
            
    t++;
            
    wait 60;
        }
        


  9. #29
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    put thread in front of all your custom scripts
    thread maps/mp etc

  10. #30
    Private
    Join Date
    Jan 2014
    Posts
    38
    Thanks
    9
    Thanked 1 Time in 1 Post
    Hmm, i'm not sure what you mean with that, can you specify?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •