Jump to content
jabeds

Need help with simple add action script

Recommended Posts

I was attempting to make a simple mission file script which adds a new scroll action to the driver of a vehicle. When this option is selected i want it to play a sound effect from my description.ext file, so that everyone in the vehicle hears the sound effect coming from the vehicle.

 

I tried a few different things but none of them really worked out, any help?

Share this post


Link to post
Share on other sites
player addAction
[
	"Play Sound",
	{
		vehicle player say3D "MySoundFromDesc";
	},
	nil,
	99,
	false,
	true,
	"",
	"vehicle player isKindOf 'Car'"
];

Put the above in the initPlayerLocal.sqf

Share this post


Link to post
Share on other sites

Omg dude this is perfect, thank you so much. Another quick question, sorry :/ , Is there a way I could then make it so that if it starts the sound the action changes to "Stop Sound" which will turn the sound effect off?

Share this post


Link to post
Share on other sites

Actually, just noticed you said the driver of the vehicle change:

"vehicle player isKindOf 'Car'"
To:

"driver (vehicle player) == player"
And with say3D it's not possible to stop the sound AFAIK, same goes for the other sounds commands I believe.

Share this post


Link to post
Share on other sites

I'm sorry to go off topic but I can not create a new topic yet. So I ask it in here:

 

Is it possible to use AI mortars in coop missions? I've created an coop MP mission and I would like to call in AI mortars.

How can I set this?

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

×