JohnyMST Posted November 2, 2013 Report Share Posted November 2, 2013 I wanted to enable fire dance on my server when players are near the fire. So I start off with my "dance.sqf" file located in: dayz_code\compile\: private["_ent"]; _ent = _this select 3; player removeAction s_player_dance; s_player_dance = -1; player playMove "ActsPercMstpSnonWnonDnon_DancingStefan"; cutText ["Let the party begin!","PLAIN DOWN"]; r_interrupt = false; _animState = animationState player; r_doLoop = true; _started = false; _finished = false; while {r_doLoop} do { _animState = animationState player; _isDancing = ["ActsPercMstpSnonWnonDnon_DancingStefan",_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 ["Awesome performance mate!","PLAIN DOWN"]; } else { r_interrupt = false; [objNull, player, rSwitchMove,""] call RE; player playActionNow "stop"; cutText ["Dance Canceled! ;(","PLAIN DOWN"]; }; Saved this and moved on to another file "fn_selfActions.sqf" located in the same folder as "dance.sqf" In "fn_selfActions.sqf" I pasted the following code to enable dance: // ---------------------------------------DANCE START------------------------------------ if (inflamed cursorTarget and _canDo) then { if (s_player_dance < 0) then { s_player_dance = player addAction ["Dance!","dance.sqf",cursorTarget, 0, false, true, "",""]; }; } else { player removeAction s_player_dance; s_player_dance = -1; }; // ---------------------------------------DANCE END------------------------------------ Then in the same file under "\\OTHERS" I pasted the below code: //DANCE START player removeAction s_player_dance; s_player_dance = -1; //DANCE END Excpected this to work fine howeve when I try and perform the dance I get error message:"dance.sqf not found" Anyone knows what I did wrong in this? Link to comment Share on other sites More sharing options...
0 ToejaM Posted November 2, 2013 Report Share Posted November 2, 2013 You need to put it in the root mission folder. \MPMissions\DayZ_Epoch_11.Chernarus or similar JohnyMST 1 Link to comment Share on other sites More sharing options...
0 JohnyMST Posted November 2, 2013 Author Report Share Posted November 2, 2013 Thanks! Will try that on next restart. question. How does fn_selfActions.sqf file know that dance.sqf is located in the root folder and not in compile folder like in my case? Also, do I need to state that dance.sqf file in my init.sqf? Link to comment Share on other sites More sharing options...
0 JohnyMST Posted November 2, 2013 Author Report Share Posted November 2, 2013 Thank you. That fixed it! Solved. Link to comment Share on other sites More sharing options...
0 Axe Cop Posted November 2, 2013 Report Share Posted November 2, 2013 In case you still want to know your can change the path here: s_player_dance = player addAction ["Dance!","FOLDER/dance.sqf",cursorTarget, 0, false, true, "",""]; just change "FOLDER" to your path.. :) Link to comment Share on other sites More sharing options...
0 JohnyMST Posted November 3, 2013 Author Report Share Posted November 3, 2013 In case you still want to know your can change the path here: s_player_dance = player addAction ["Dance!","FOLDER/dance.sqf",cursorTarget, 0, false, true, "",""]; just change "FOLDER" to your path.. :) Yeah I did that and changed around 5 times before I came here. putting dance.sqf into another folder even if I called it as in your example didn't help Tried all ''alternatives'' and only worked in root folder Link to comment Share on other sites More sharing options...
0 MatthewK Posted December 1, 2013 Report Share Posted December 1, 2013 It doesn't work because you've got your slashes facing forward and not backwards.. you're backwards going forward lol your path should be like this: Folder\file.sqf , not: Folder/file.sqf himler 1 Link to comment Share on other sites More sharing options...
0 RacoonCH Posted October 20, 2014 Report Share Posted October 20, 2014 Is there any way to adapt the code for Arma 3 ? Link to comment Share on other sites More sharing options...
Question
JohnyMST
I wanted to enable fire dance on my server when players are near the fire.
So I start off with my "dance.sqf" file located in: dayz_code\compile\:
Saved this and moved on to another file "fn_selfActions.sqf" located in the same folder as "dance.sqf"
In "fn_selfActions.sqf" I pasted the following code to enable dance:
Then in the same file under "\\OTHERS" I pasted the below code:
Excpected this to work fine howeve when I try and perform the dance I get error message:
"dance.sqf not found"
Anyone knows what I did wrong in this?
Link to comment
Share on other sites
7 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