Jump to content
Sign in to follow this  
shik4ri

AddAction problem

Recommended Posts

Hey Guys!

I want to create a Singleplayer Mission.

Your first task is to reach a camp. When u reach the Camp, a Cellphone starts to ring (Trigger, say3D).

The ringtone should stop when u act with "Awnser". Then, the next soundfile should start.The caller talks to the person who accept the call.

Next task is a meeting with the caller.

Any Ideas?

Greets

---------- Post added at 19:53 ---------- Previous post was at 19:24 ----------

Question is:

how can I stop the say3D soundfile with Addaction "Awnser the Call".?

The say3D sound starts with an trigger [player distance cellphone<5];

Share this post


Link to post
Share on other sites

I don't think you can stop the sound but if you delete the object it will kill the sound.

Share this post


Link to post
Share on other sites

Okay, got it.

But next problem.

to set play a sound and delet it I need to klicks in the action menu on the item.

Is something like this possible?

like playsound and set call awnserd = true

Edited by SHIK4RI

Share this post


Link to post
Share on other sites

This is how I'd expect it to work, in theory.

Place your sat phone and name it Phone in the init place the addaction

this addaction ["phone",{[phone,"answer"] execvm "phone.sqf"}]

Place a trigger over the phone set to activate at the distance you require then do the following

BLUFOR Present Repeating

cond

player in thislist

on act

null=[phone,"Ring"] execvm "phone.sqf"

on deac

deletevehicle fake

Now you just need a small script

_obj = _this select 0;// used to get the location
_sound = _this select 1;// sound file you want to play

deletevehicle fake;// delete the previous sound

// spawn a fake object that you can delete and use it to kill the sound
_PhoneGRP = creategroup west;
fake = _Phonegrp createunit ["logic",position  _obj,[],10,"none"];
fake say3d [_sound,5];

Now you just need to set up two sounds using description.ext one for the ring and the other for the message.

I called them "Ring" and "answer" change to match whatever your using.

I can't test right now but it should work if it's written correctly.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×