Scripting questions
Moderator: Moderators
- HDL_CinC_Dragon
- Brigadier General
- Posts: 574
- Joined: Mon Dec 22, 2003 8:32 pm
Hey guys, ok ive gotten a lot better at my scripting thnx to all of you who helped. But heres a relativly simple question... how do I make it so that my trigger turns off right after it is activated? like heres an example...
Thread name:
$Object Trigger waittill trigger
-- De-Activate trigger --
$Object loopsound lighthouse_run
$Object moveup 123
$Object waitmove
$Object stoploopsound
-- Re-Activate trigger --
$Object Trigger waittill trigger
-- De-Activate trigger --
$Object loopsound lighthouse_run
$Object movedown 123
$Object waitmove
$Object stoploopsound
goto Thread name
end
kinda like that so the Object dosnt go down after a certain time, only when the user wants it to... any ideas?
Thread name:
$Object Trigger waittill trigger
-- De-Activate trigger --
$Object loopsound lighthouse_run
$Object moveup 123
$Object waitmove
$Object stoploopsound
-- Re-Activate trigger --
$Object Trigger waittill trigger
-- De-Activate trigger --
$Object loopsound lighthouse_run
$Object movedown 123
$Object waitmove
$Object stoploopsound
goto Thread name
end
kinda like that so the Object dosnt go down after a certain time, only when the user wants it to... any ideas?
trigger
You have to use the targetname of the trigger, not the bridge.
Thread_name:
$object_trigger waittill trigger // Wait for trigger event
$object_trigger nottriggerable // Turns it off
$Object loopsound lighthouse_run
$Object moveup 123
$Object waitmove
$Object stoploopsound
$object_trigger triggerable // Turns it on
$object_trigger waittill trigger // Wait for trigger event
$object_trigger nottriggerable // Turns it off
$Object loopsound lighthouse_run
$Object movedown 123
$Object waitmove
$Object stoploopsound
$object_trigger triggerable // Turns it on
goto Thread_name
end
A trigger does not really need to be turned off, if your thread has the "waittill" lines--because nothing can happen until the thread gets to those lines. And, the "waitmove" stops the thread until the move is done.
Thread_name:
$object_trigger waittill trigger // Wait for trigger event
$object_trigger nottriggerable // Turns it off
$Object loopsound lighthouse_run
$Object moveup 123
$Object waitmove
$Object stoploopsound
$object_trigger triggerable // Turns it on
$object_trigger waittill trigger // Wait for trigger event
$object_trigger nottriggerable // Turns it off
$Object loopsound lighthouse_run
$Object movedown 123
$Object waitmove
$Object stoploopsound
$object_trigger triggerable // Turns it on
goto Thread_name
end
A trigger does not really need to be turned off, if your thread has the "waittill" lines--because nothing can happen until the thread gets to those lines. And, the "waitmove" stops the thread until the move is done.
-
Master-Of-Fungus-Foo-D
- Muffin Man
- Posts: 1544
- Joined: Tue Jan 27, 2004 12:33 am
- Location: cali, United States
Re: file type
where the HECk is file type?(yes i have win(xp))tltrude wrote:Under "File Type" in Windows you can change what program is used to open .scr files (Notepad or Wordpad). Also in Winzip, you can uncheck the option for automatically installing screensavers.
-
Master-Of-Fungus-Foo-D
- Muffin Man
- Posts: 1544
- Joined: Tue Jan 27, 2004 12:33 am
- Location: cali, United States
- HDL_CinC_Dragon
- Brigadier General
- Posts: 574
- Joined: Mon Dec 22, 2003 8:32 pm
in the Control Panel > Folder Options > File Types
When you click on the "file types" tab you may need to wait 5 - 10 seconds while it pulls up every single file type it can find. But all you have to do is go to the SCR file type and change what ever you want (i would suggest not messing with any of the other file types)
And thanx for the help Tom.
Oh, heres another question, how do I make
Script>Object
Key: targetname
Value: B3
RotateX 90? stop, wait 10 seconds, rotateX 90??Any help would be great thnx.
When you click on the "file types" tab you may need to wait 5 - 10 seconds while it pulls up every single file type it can find. But all you have to do is go to the SCR file type and change what ever you want (i would suggest not messing with any of the other file types)
And thanx for the help Tom.
Oh, heres another question, how do I make
Script>Object
Key: targetname
Value: B3
RotateX 90? stop, wait 10 seconds, rotateX 90??Any help would be great thnx.
script
You whould have to script it, if it is up and down.
That will work, if the trigger_use is targetnamed "$B3_trigger". The thread would have to be started under prespawn with "thread B3_mover".
Code: Select all
B3_mover:
$B3_trigger waittill trigger
$B3 rotateXUp 90
$B3 waitmove
wait 10
$B3 rotateXDown 90
$B3 waitmove
goto B3_mover
end
Last edited by tltrude on Wed Aug 25, 2004 6:52 pm, edited 1 time in total.
- HDL_CinC_Dragon
- Brigadier General
- Posts: 574
- Joined: Mon Dec 22, 2003 8:32 pm
well its not rotating up or down, i basically want it to spin around a center axis. so it basically like a door but I want it o work off of a trigger insetad of walking up to it and opening it like a door. An example would be that its a brush 128units high, 8 units wide, 64 units long that is a Func>Rotating Door but there is no origin on the sides so it just spins around its center. Thats pretty much what I want it to do but i want it on a trigger. any help?
Last edited by HDL_CinC_Dragon on Wed Aug 25, 2004 7:08 pm, edited 1 time in total.
spin
Code: Select all
B3_spin:
$B3 rotateYup 90
$B3 waitmove
wait 10
goto B3_spin
end
- HDL_CinC_Dragon
- Brigadier General
- Posts: 574
- Joined: Mon Dec 22, 2003 8:32 pm
- HDL_CinC_Dragon
- Brigadier General
- Posts: 574
- Joined: Mon Dec 22, 2003 8:32 pm
well its not rotating up or down, i basically want it to spin around a center axis. so it basically like a door but I want it o work off of a trigger insetad of walking up to it and opening it like a door. An example would be that its a brush 128units high, 8 units wide, 64 units long that is a Func>Rotating Door but there is no origin on the sides so it just spins around its center. Thats pretty much what I want it to do but i want it on a trigger. So its not like a bridge its more like a door.
door
The func_rotatingdoor can do that, if you set the AUTO_OPEN spawnflag (one of the little check boxes). AUTO_OPEN causes the door to open when a player is near instead of waiting for the player to use the door. You can also add key/value "wait 10" to delay closing.
- HDL_CinC_Dragon
- Brigadier General
- Posts: 574
- Joined: Mon Dec 22, 2003 8:32 pm
- HDL_CinC_Dragon
- Brigadier General
- Posts: 574
- Joined: Mon Dec 22, 2003 8:32 pm
ok, heres another problem, my map isnt working! I put the .BSP in my DM folder and my .SCR is in there too. I checked my spelling in the script and i check my spelling in the the script object properties and every thing is spelled right and all the value match the script and every thing. here is what my script looks like...
Did i do something wrong? PLZ help!
Code: Select all
Main:
Thread B1_Control
$B1 time 10
Thread B2_Control
$B2 time 10
Thread B3_Control
$B3 time 5
end
B1_Control:
$S1 waittill trigger
$S1 nottriggerable
$B1 loopsound lighthouse_run
$B1 moveup 352
$B1 waitmove
$B1 stoploopsound
$S1 triggerable
$S1 waittill trigger
$S1 nottriggerable
$B1 loopsound lighthouse_run
$B1 movedown 352
$B1 waitmove
$B1 stoploopsound
$S1 triggerable
goto B1_Control
end
B2_Control:
$S2 waittill trigger
$S2 nottriggerable
$B2 loopsound lighthouse_run
$B2 moveup 352
$B2 waitmove
$B2 stoploopsound
$S2 triggerable
$S2 waittill trigger
$S2 nottriggerable
$B2 loopsound lighthouse_run
$B2 movedown 352
$B2 waitmove
$B2 stoploopsound
$S2 triggerable
goto B2_Control
end
B3_spin:
$B3 rotateY 90
$B3 waitmove
wait 10
$B3 rotateY 90
$B3 waitmove
goto B3_spin
end

