Liandri
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Liandri

The forum offers unofficial support for UnrealEd users and serves as a comfortable rest-room for a friendly community.
 
HomeLatest imagesRegisterLog in

 

 Help on Scripted Triggers

Go down 
2 posters
AuthorMessage
Shadowwill




Posts : 26
Join date : 2009-01-04

Help on Scripted Triggers Empty
PostSubject: Help on Scripted Triggers   Help on Scripted Triggers Icon_minitimeSun Jan 24, 2010 4:37 am

Hello, id like to learn how to use scripted triggers in order to trigger such things like random arty in a Red Orchestra level im working on. Ive coped one across from another map which works fine but id like to learn for myself. When looking through the properties its really quite a blur to me. I dont understand the 'action_WAITFORTIMER' or 'WAITFORACTION' and stuff like that. I was wondering if you could walk me through some of the features and things i must do/set in order to trigger something. Ive attached an example of what the scripted trigger looks like.

Thanks buddy !

Help on Scripted Triggers Exampl10
Back to top Go down
Murphy

Murphy


Posts : 147
Join date : 2008-10-18
Age : 36

Help on Scripted Triggers Empty
PostSubject: Re: Help on Scripted Triggers   Help on Scripted Triggers Icon_minitimeSun Jan 24, 2010 7:10 pm

It's tiny bit like scripting commands, which is why it's called a ScriptedTrigger, I guess.

The ScriptedTrigger will just rattle down all of its actions in the order you pur them in. It will do this instantly, except there is a delay at a certain action. Then it waits at this action until the delay is over and then it continues. The following three are the most common delays, I think:

WAITFORTIMER means it waits for a timer to count to zero. You can set the number it should start from in the field then. E.g. if you set it to 10 the ScriptedTrigger will pause for 10 seconds once it gets to this action and after those ten seconds it will rattle on from the next action.
WAITFOREVENT means it waits at this action until the event you set in the field is triggered somewhere. For example by a regular trigger. Once it detects this event being fired somwhere it goes on to the next action.
WAITFORACTION means it waits until a certain action withing the ScriptedTrigger is reached. All the actions are numbered starting with 0.
For example, I could have a ScriptedTrigger that has 7 actions which are all necessary for a specific task (e.g. waiting for someone to press a button someplace and then blowing stuff up with special effects and all) and another couple of actions after that that deal with the next objective. Actions number 0, 1, 2 and 3 are all responsible for making sure the player does everything that is necessary and then they make the blocking object move out of the way. 4 and 5 are responsible for explosion effects when this happens and 6 and 7 are responsible for after-math effects, like scarring projectors or lingering smoke, etc.
Now, I could want the ScriptedTrigger to commence at action 9 as soon as the way is free (because the lingering smoke that follows after a delay isn't important for the gameplay), so I can set action 8 to WAITFORACTION 3. As soon as action 3 is reached, action 9 starts too then.

GOTOACTION is similar, but it lets you jump to a certain action. E.g. if I have 4 actions. Action number 0 is WAITFOREVENT and number 2 is for an explosion and 3 is a delay of 10 seconds (WAITFORTIMER 10). A player can press a button somewhere and thus trigger and event. The ScriptedTrigger picks this up and starts. The explosion happens. Then I want the player to be able to do the same thing again after 10 seconds have passed (e.g. time for the explosive to rearm itself. Maybe even with sound!?). So I make action number 4 GOTOACTION 0. The ScriptedTrigger then jumps back to action 0 and the trap is set again.

I hope this helps a bit.

Here is some more info you might find helpful:
ScriptedTrigger page at the Unreal Wiki
Back to top Go down
Shadowwill




Posts : 26
Join date : 2009-01-04

Help on Scripted Triggers Empty
PostSubject: Re: Help on Scripted Triggers   Help on Scripted Triggers Icon_minitimeSun Jan 24, 2010 10:16 pm

Finally got one to work ! Thanks Murphy. One effect i am trying to make is where a scripted trigger sets off a tank blast effect and plays a blast sound. Ive got it all to work along with the blast sound, but the problem im having is the blast sound is too quiet. Ive tried the 'playsound' option but i find there is no way for me to change the radius of the sound effect, like the way you can with ambient sound actors. Ive tried the 'action_playambientsound' but the thing is once its triggered it doesnt stop of course. Is there any way to increase the radius of the sound played by the trigger?

Cheers Murph.
Back to top Go down
Murphy

Murphy


Posts : 147
Join date : 2008-10-18
Age : 36

Help on Scripted Triggers Empty
PostSubject: Re: Help on Scripted Triggers   Help on Scripted Triggers Icon_minitimeThu Jan 28, 2010 2:13 am

Set the sound options in a TriggerLight instead of an AmbientSound! You can control the radius and everything, but the catch is the sound is only played as long as the TriggerLight is switched on!

If the volume of the sound is too low even with the volume turned all the way up in the Sound options of the TriggerLight (or an AmbientSound, or anything else that has sound options) there isn't much you can do about that except exporting it, boosting the volume a few decibel in Audacity (free to download) and then re-importing it into myLevel and use the now louder sound instead of the original.
Back to top Go down
Sponsored content





Help on Scripted Triggers Empty
PostSubject: Re: Help on Scripted Triggers   Help on Scripted Triggers Icon_minitime

Back to top Go down
 
Help on Scripted Triggers
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Liandri :: = UnrealEd :: Leveldesign and Tech-Support-
Jump to: