So basically im using this dance script that i found on open dayz that allows players to dance when they scroll on a firepit. Everything works great but they didn't mention where you put your .ogg file for it play a short clip when activated. Below is the script for the dance.sqf file
private["_ent"];
_ent = _this select 3;
player removeAction s_player_dance;
s_player_dance = -1;
_danceMoves = ["ActsPercMstpSnonWnonDnon_DancingDuoStefan","ActsPercMstpSnonWnonDnon_DancingDuoIvan","ActsPercMstpSnonWnonDnon_DancingStefan"] call BIS_fnc_selectRandom;
player playMove _danceMoves;
_nul = [objNull, player, rSAY, "music"] call RE;
cutText ["You can dance if you want to!","PLAIN DOWN"];
r_interrupt = false;
_animState = animationState player;
r_doLoop = true;
_started = false;
_finished = false;
while {r_doLoop} do {
_animState = animationState player;
_isDancing = [_danceMoves,_animState] call fnc_inString;
if (_isDancing) then {
_started = true;
};
if (_started and !_isDancing) then {
r_doLoop = false;
_finished = true;
};
if (r_interrupt) then {
r_doLoop = false;
};
sleep 0.1;
};
r_doLoop = false;
if (_finished) then {
cutText ["WTF are you doing mate ?","PLAIN DOWN"];
} else {
r_interrupt = false;
[objNull, player, rSwitchMove,""] call RE;
player playActionNow "stop";
cutText ["Dance Cancelled! ;(","PLAIN DOWN"];
};
Below code is in fn_selfActions.sqf
// ---------------------------------------FIRE DANCE START------------------------------------
if (inflamed cursorTarget and _canDo) then {
if (s_player_dance < 0) then {
s_player_dance = player addAction ["Dance!","scripts\dance.sqf",cursorTarget, 0, false, true, "",""];
};
} else {
player removeAction s_player_dance;
s_player_dance = -1;
};
// ---------------------------------------FIRE DANCE END------------------------------------
But when you're in game and start the dance a window pops up that says "cannot find file music" and you click ok but start dancing. I'm not exactly sure where to put my little 15 second .ogg clip. If someone wouldn't mind giving me a little info on where to put it that would be great. I'm new to scripting but im not sure where or what to add that would tell the dance script that "music" is located, say in addons\music.ogg in the mpmissions pbo.
Question
btakasper
So basically im using this dance script that i found on open dayz that allows players to dance when they scroll on a firepit. Everything works great but they didn't mention where you put your .ogg file for it play a short clip when activated. Below is the script for the dance.sqf file
Below code is in fn_selfActions.sqf
But when you're in game and start the dance a window pops up that says "cannot find file music" and you click ok but start dancing. I'm not exactly sure where to put my little 15 second .ogg clip. If someone wouldn't mind giving me a little info on where to put it that would be great. I'm new to scripting but im not sure where or what to add that would tell the dance script that "music" is located, say in addons\music.ogg in the mpmissions pbo.
Thanks
Link to comment
Share on other sites
10 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now