On my two floor elevator (trying to keep it simple), I'm trying to add floor call buttons, but everything I've tried is either faulty, or just doesn't work.
** I tried adding 2 additional move threads, and that got me some faulty results and I got "Elevator one - going down" three times...
* My more pathetic attempt was I made the two additional trigger_use 's on the floors and just CTRL+K 'ed them both to the eleone. That didn't work.
Please help, I know there's probably something simple I overlooked...
// SH2 Testing
// ARCHITECTURE:GCC Nigel
// SCRIPTING: Mostly copied from others, but Nigel
I think you have the trigger names confused. First off, its probably not a good idea to use " * " in a name -- the script may see it as a math function. Also, your two floor triggers can target $eleone in the cab.
Key: target
Value: $eleone
They will then become remote triggers. Still need to turn off each floor trigger when the cab is on its floor.
Sorry, I just threw in asteriks to show where my pathetic attempts at coding were.
I used ctrl+k on both triggers to give them both target = "eleone" and then none of them worked. I have all three triggers as "trigger_use"s. Can "trigger_use"s fire other "trigger_use"s?
I was under the impression that ctrl+K just gave a target to the second selections targetname or gave it a targetname if it didn't have one. I'll try it again with just manual editing.
On a separate idea: Is there a way to get .scr's to open with notepad or something automatically? I figure that actual screensavers would work fine either way (as long as I don't change them). Changing .scr to .txt loses its luster quickly.
On a somewhat similar, nontheless separate idea: Do I need the $elevator_cab speed 64 the first time in the waitill prespawn section or the one in the waitill spawn section? Or neither? Or both...
Just going for the 6 edit mark now: Level.elepos is just a variable name right? or is "level.elepos" something much more technical? If it's a variable, I could change it to "eleonepos" as well as all other references, right?
I'm not positive the remote trigger idea will work -- its been a while and I don't have the the editor or the game installed anymore. You could also try...
Key: setthread
Value: move
Setthread runs the thread named in the value when the trigger is used. It would have to be in all three triggers and the line "$eleone waittill trigger" would have to be removed from the "move:" thread. And the "goto move" line would also need to be remove from all threads. Also, "thread move" would no longer be needed in the "standby:" thread.
To get the script to open with notepad, open "my Computer" and go to Tools > Folder Options > File Types. Then scroll down to "scr" and change it to open with Notepad. Doing that will not mess up your screensaver files, although they do use the same extention.
You only need to set the speed one time.
Yes, "Level.elepos" is a variable name and can be any name you wish. But, it must start with "level.", so it can be used in any thread. I always found it useful to not use capital letters in variable names (Level - level).
The line, "exec global/SH2.scr" is not needed in your script, unless you have a script with that name in the global folder. Your map's script will run automatically, if it has the same name as the bsp file and is located in the same folder (dm) as the bsp.
Note: Please re-post your script, with your changes, if you need more help.
Everything is working except the sounds, but I remember seeing a tutorial about putting in sounds... I'm eventually going to try to get three separate elevators in a single multiple player map and I'm worried about potential lag. Is my worry well-founded? I also noticed on other maps where sounds are played they can be heard all over the map... Is there a way to localize the sound, maybe with a trigger bound to the elevator so the noise is just inside?
Sounds are working.
Now that I've got the one elevator working perfectly, I've gone and tried to set up a second. Now neither works. I don't know why.
It says somethings wrong with my trigger uses and setthreads...
// SHTech
// ARCHITECTURE:GCC Nigel
// SCRIPTING: Still a fair bit copied, but significantly more Nigel
Recheck your trigger targetnames and setthred values. It would be easier to use numbers in the names, I think. Also, if you seperate the threads for each elevator in the script, it would be easier to work on them. I don't see any thing bad in the script, other than being hard to read, so it must be the triggers.
For the sound range, these numbers (in red) are how it is set.
The first distance number (in units) is how far a player will hear the sound at full volume. Then the sound will fade as the player walks away until he reaches the second distance number where it cuts out completly.
I tried switching setthread to move2 and made changes to the script accordingly and got no result. I checked all my trigger_use setthreads and they all seem fine, but again have the setthread move2 where the value isn't put into the value position for some reason, but it worked fine before.
In the console in MoH I see the 6 trigger_use with setthread errors.
I keep compiling my map with a leak so it goes faster, could that be a problem?
Make a copy of your script as a backup, then remove all the stuff for the second elevator and try to get the first one working again.
You can make a log file for the console by typing logfile 1 in it just before you startup the map. Afterwards, you'll find qconsole.log in main. It can be opened with Notpad, and you can copy and paste the error warnings here.
I took all the elevator 2 lines from the script and took all the triggers out and began to re add them. I think when I copied the entire elevator system, the trigger_use may have still been linked somehow.
I did the logfile after I fixed the solo elevator, but it is just full of static model errors, nothing in it is script based.
hi all
I've spowned an object by scripting and I want make it an elevator.
I mean I want it go up and down automatically(without a call button) is it possible? can someone tell me how to do that or give me a link for a tutorial? I love scripting but it's hard learn!!!
thanx