Jump to content

ISSUE: Tutorial does not work


Recommended Posts

Posted

This is the working script:

 

 

affect ( "rotadoor1", /*@AFFECT_TYPE*/ FLUSH )
{

    task ( "drota1" )
    {
        rotate ( < 0.000 -90.000 0.000 >, 2500.000 );
    }

    dowait ( "drota1" );
}

 

This is when I try to add sound:

 

affect ( "rotadoor1", /*@AFFECT_TYPE*/ FLUSH )
{

    task ( "drota1" )
    {
        sound ( /*@CHANNELS*/ Include Error!!!, "sound/aurelia/holodeck_door.mp3" );
        rotate ( < 0.000 -90.000 0.000 >, 2500.000 );
    }

    dowait ( "drota1" );
}

Signature.jpg

Posted

Yes, but you should still setup the pref's properly........................................................................................................................................ I can do exasperated dots too. See?

Posted

Click set all options to JKA and set your prefs up again. I have a feeling you aren't pointed correctly at the SourceForBehavEd folder. It could also be that you aren't pointed at behaved.bhc for Command Description File. Try the usual Windows 7 junk of running in admin and compatibility just in case.

Posted

Don't know how but after resetting everything again, it works now. Only problem that I have that the sound is being played everytime I hit the trigger. Is there a way to play the sound only when the doors move ??

Signature.jpg

Posted

You mean if you spam the trigger button while the doors are already moving?

If so, you could use the key "wait" on the door, in GTKradiant and set it to the equal amount of milliseconds that the door is moving. This will unable you to press the trigger until the door has stopped moving.

Posted

You mean if you spam the trigger button while the doors are already moving?

If so, you could use the key "wait" on the door, in GTKradiant and set it to the equal amount of milliseconds that the door is moving. This will unable you to press the trigger until the door has stopped moving.

That works but I was wondering if I could get the same result by scripting . . .

Signature.jpg

Posted

To achieve the same result by scripting, you can use set_inactive (true/false).

 

Drag a "set" into the task, and find "set_inactive" under booleans. To bring up the true/false alternatives, it's a bit weird, but this is the way I make it work: Click OK after selecting set_inactive, and then double click on it again to bring the event editor back up. Now click the "helper" button and then just click "Reset!" again, and it should now display a true/false alternative. So if inactive is true, the trigger cannot be used, and if it is false, it is active and can be used.

 

So, put shortly, you can set it inactive in the task, and set it active again after the "dowait", with the same method. That means once it runs, it inactives itself, and after it is done (dowait) it becomes active.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...