
Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Dec 25, 2008 06:12 PM
Msg. 1 of 20
1) Make a sound play after another sound is done
How would you make a .sound tag play only after the previous was done? I could measure the first tag and see how long it was, then sleep that much, but that takes too long for each individual sound tag. I feel it would be wrong to ask "Does anyone know how", because someone obviously must know how, so instead, I'm asking "Does anyone want to tell me and / or the other people reading this thread?".
2) Have a locked door unlock
How would you unlock a previously locked door after you step into a trigger volume?
|
|
|

Ermac
Joined: Nov 24, 2006
Pops up from time to time
|
Posted: Dec 25, 2008 07:16 PM
Msg. 2 of 20
(sleep (sound_impulse_time nameofsoundhere)) (sound_impulse_start yournextsound) ) To unlock a previously locked door after stepping into a trigger volume: (sleep_until (= (volume_test_objects nameoftriggervolume (players)) true) 15) (device_set_power nameofyourdoor 1) )
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Dec 25, 2008 07:59 PM
Msg. 3 of 20
Also, one more question. How would I get the magic_load command to work for AI? I've attempted to attach a named biped to the encounter, and then load the biped, but instead the biped just runs suicidally towards a wall, or occasionally walks into it.
|
|
|

Ermac
Joined: Nov 24, 2006
Pops up from time to time
|
Posted: Dec 25, 2008 08:40 PM
Msg. 4 of 20
Loading one biped: (vehicle_load_magic nameofvehicle "nameofseat" nameofbiped) Loading an entire squad or encounter: (vehicle_load_magic nameofvehicle "nameofseat" (ai_actors nameofencounter/nameofsquad)) Note: The name of your seat(s) can be left blank if you're loading a squad into a vehicle. They'll choose their seats at random then. When referring to a squad, you must type it exactly as I noted in my last example. Encounter/Squad. Otherwise, it'll think you're referring to an encounter, and then tell you that said encounter doesn't exist.
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Dec 25, 2008 08:50 PM
Msg. 5 of 20
So if I had a warthog, and it was named vehicle, and I also had an AI encounter, named encounter, and the squad was named squad, and if I wanted to leave the name of the seat blank, would I type in (vehicle_load_magic vehicle "" (ai_actors encounter/squad))
|
|
|

Ermac
Joined: Nov 24, 2006
Pops up from time to time
|
Posted: Dec 25, 2008 08:51 PM
Msg. 6 of 20
Yup. No space between the quotation marks though. (unless that's just the way the font looks, and you really didn't put a space there)
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Dec 25, 2008 09:39 PM
Msg. 7 of 20
Actually, one more question, is it possible to give the player a weapon? Edited by Gamma927 on Dec 25, 2008 at 10:05 PM
|
|
|

Ermac
Joined: Nov 24, 2006
Pops up from time to time
|
Posted: Dec 26, 2008 12:51 PM
Msg. 8 of 20
You can use a script to do so. (player_add_equipment [unit] [starting_profile] [boolean]) If you are trying to ADD equipment, the boolean should be marked FALSE. If it is marked TRUE, it will reset the player's equipment to what the starting profile is, overriding any weapons the player may have had before. For the unit, you must know how to refer to the player as a unit. Put this script at the top of your script; this way, when it compiles in Sapien, it won't overlook it when it is called from another script and end up giving you a false error. (script static "unit" player0 (unit (list_get (players) 0)) ) Once you put that script at the top, any time you want to refer to the player (like to put the player in a vehicle, or add equipment), you will be able to refer to the player as "player0".
|
|
|

black doom
Joined: Oct 4, 2008
we will never stop, we can win the "impossible"
|
Posted: Dec 26, 2008 01:33 PM
Msg. 9 of 20
just add this as back ground music.
|
|
|

black doom
Joined: Oct 4, 2008
we will never stop, we can win the "impossible"
|
Posted: Dec 26, 2008 01:50 PM
Msg. 10 of 20
sapien-> edit types-> background sound
choose a sound_looping, name it, and save.
sapien->background sound->propety window (something like that.)
choose the sould_looping you just saved.
|
|
|

Headhunter09
Joined: May 6, 2008
This is the truth.
|
Posted: Dec 26, 2008 02:31 PM
Msg. 11 of 20
since this thread is conveniently already made, can I ask:
How do you get a function like the flashlight to turn on active camo? I've seen all the commands, but when I tried it it didn't work.
|
|
|

sierra117
Joined: Jan 10, 2008
If sex is good exercise, why are there fat sluts?
|
Posted: Dec 26, 2008 11:07 PM
Msg. 12 of 20
for the music in a UI add this script:
(script startup music (begin (sound_looping_start "sound\music\YOUR MUSIC" none 1) )
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Dec 26, 2008 11:11 PM
Msg. 13 of 20
This should be renamed to "General Scripting Help"... Anyway, I have another question, how would I get a vehicle to stop executing a recorded animation when it passes through a trigger volume?
|
|
|

sierra117
Joined: Jan 10, 2008
If sex is good exercise, why are there fat sluts?
|
Posted: Dec 26, 2008 11:38 PM
Msg. 14 of 20
i dont know how to make it happen when the vehicles goes through but for the player its this:
(script startup stop_record (sleep_until (volume_test_objects trigger (players)) 1) (recording_kill pelican) )
pelican=vehicle and trigger=trigger volume
EDIT: i think you change (players)) 1) to a different object list, some how that will make it to a vehicle? Edited by sierra117 on Dec 26, 2008 at 11:40 PM
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Dec 26, 2008 11:58 PM
Msg. 15 of 20
K another question, probably not about scripting, but some help is still required. How would I set a biped to not have fall damage?
|
|
|

Me KS
Joined: Feb 2, 2008
Desire is Reality. Xfire: jetmaster23
|
Posted: Dec 27, 2008 12:29 AM
Msg. 16 of 20
Quote: --- Original message by: drillinstructor Once you put that script at the top, any time you want to refer to the player (like to put the player in a vehicle, or add equipment), you will be able to refer to the player as "player0". When referring to a static script to be used as an argument for something, you need to treat it just like a command: put parentheses around it. So you actually have to refer to the player as "(player0)" with that script. So like this for example: (unit_kill (player0))
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Dec 27, 2008 12:36 AM
Msg. 17 of 20
I meant a biped, not yourself. I already gave myself no fall damage, but I want to know how to do the same with everyone else.
|
|
|

black doom
Joined: Oct 4, 2008
we will never stop, we can win the "impossible"
|
Posted: Dec 27, 2008 07:43 AM
Msg. 18 of 20
Quote: --- Original message by: Gamma927 I meant a biped, not yourself. I already gave myself no fall damage, but I want to know how to do the same with everyone else. checking "no fall damage" in the biped. Edited by black doom on Dec 27, 2008 at 07:43 AM
|
|
|

Headhunter09
Joined: May 6, 2008
This is the truth.
|
Posted: Dec 27, 2008 08:04 AM
Msg. 19 of 20
nobody answered my question 
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: Dec 27, 2008 10:13 AM
Msg. 20 of 20
Quote: --- Original message by: Headhunter09nobody answered my question  Basically, set it to check if the flashlight is on, and if it is, then run the commands. I don't have either script, but I've looked at some
|
|
|