Jump to content
Sign in to follow this  
Funkman

Dance Script - Simple Question

Recommended Posts

Thanks Woodstock. Yeah they are good shots I think..It is Utes.

I do appreciate you putting in that clean format for me, but I actually dont need it to exit the script as it is for a movie I am hoping to make. I actually got it all to work once I cleaned up the cameraFOV command I had at the start.

Once again, thanks for the help.

Share this post


Link to post
Share on other sites

oh no worries man glad i could help ya out. and post a link when you have the movie done if you plan on sharing it would love to check it out

Share this post


Link to post
Share on other sites

O yeah, will do, it might take a while, but I will post back and show it off...

Share this post


Link to post
Share on other sites

If I may be so bold as to ask for some more help, I have the following script called "Shoot.sqf":

It does not seem to be working as intended.

It is called in the on activation condition in a waypoint, so basically, the BMP gets to the waypoint, triggers the script.

In the script, there are camera shots, the BMP is alrady set to Never Fire. What happens is that the BMP aims right at this man, then when it looks like he is about to die, we destroy it... Cue high drama and tense dramatic moment.

Just wondering whether there are any obvious flaws with it???

showCinemaBorder false;

creating the camera

_cam = "camera" CamCreate (getPos BMP);

_cam cameraeffect ["external", "back"];

_cam camsettarget [100274.32,16819.44,-30377.43];

_cam attachTo [bMP, [1.00, -3.2, 1.7]];

_cam camSetFOV 0.7;

_cam camcommit 0;

vehicle BMP doTarget US1;

US1 disableAI "Move";

US1 setUnitPos "DOWN";

_cam camSetTarget [-76957.20,55079.41,-28272.94];

_cam camSetPos [5699.12,6302.96,3.61];

_cam camCommit 0;

_cam camSetTarget [-76954.92,55078.08,-28271.68];

_cam camSetPos [5689.54,6307.62,3.17];

_cam camCommit 4;

Sleep 4;

//Next to man

_cam camSetTarget [-75826.34,54412.05,-32419.16];

_cam camSetPos [5687.92,6309.39,0.62];

_cam camCommit 0;

//Pan up and zoom in

_cam camSetTarget [-81860.84,52559.69,13742.96];

_cam camSetPos [5687.91,6309.34,0.28];

_cam camSetFOV 0.174;

_cam camCommit 5;

Sleep 6;

//Shot next to BMP explodes

_cam camSetTarget [84907.30,-49321.77,-24738.43];

_cam camSetPos [5660.05,6321.86,3.13];

_cam camSetFOV 0.7;

_cam camCommit 0;

Sleep 2.5;

BMP setDamage 1.0;

//Final fly and pan

_cam camSetTarget [82322.27,-47506.68,-34744.13];

_cam camSetPos [5652.20,6332.34,4.71];

_cam camCommit 0;

_cam camSetTarget [82322.27,-47506.68,-34744.11];

_cam camSetPos [5659.94,6320.69,6.28];

_cam camCommit 3;

Sleep 3;

_cam camSetTarget [-78368.13,57472.13,-17882.82];

_cam camSetPos [5697.40,6301.60,4.67];

_cam camCommit 3;

Share this post


Link to post
Share on other sites

In what way(s) is it not working as intended? Are you getting any errors in the arma2.rpt file?

It may also be worth using

waitUntil { camCommitted _cam };

in place of, or in addition to, the sleep statements.

Share this post


Link to post
Share on other sites

Hmm, ok thanks for suggestion.

I will elaborate. Basically, I had the script without any cams in it, just the doTarget and all the rest of it. I ran it, and once the BMP got to the intended waypoint, it sat there and pointed at the target as intended. Superb!

Then I grabbed a bunch of shots and added them in. Now it seems as though maybe it does not quite reach the waypoint, it never targets the man, and none of the cameras trigger.

So its kind of got me stumped (no pun intended ;) ), I havnt been using show script errors, but I suppose I better turn it on..It just annoys me for some reason.

Share this post


Link to post
Share on other sites

Ok well, it seems that part of the script it working, it gets to the waypoint, fails to trigger the cameras, fails to target the man as per

vehicle BMP disableAI "AUTOTARGET"

vehicle BMP doTarget US1;

Then fails to trigger all the rest of the cameras, but it does explode after a while as per

BMP setDamage 1.0;

So somethings are working and some things are not.

Here is the full script I am now using, the lines in bold are the ones that I know are actually working as intended:

showCinemaBorder false;

//creating the camera

_cam = "camera" CamCreate [5699.12,6302.96,3.61];

_cam camsettarget [-76957.20,55079.41,-28272.94];

_cam camSetFOV 0.7;

_cam camcommit 0;

vehicle BMP disableAI "AUTOTARGET"

vehicle BMP doTarget US1;

US1 disableAI "Move";

US1 setUnitPos "DOWN";

_cam camSetTarget [-76957.20,55079.41,-28272.94];

_cam camSetPos [5699.12,6302.96,3.61];

_cam camCommit 0;

_cam camSetTarget [-76954.92,55078.08,-28271.68];

_cam camSetPos [5689.54,6307.62,3.17];

_cam camCommit 4;

Sleep 4;

//Next to man

_cam camSetTarget [-75826.34,54412.05,-32419.16];

_cam camSetPos [5687.92,6309.39,0.62];

_cam camCommit 0;

//Pan up and zoom in

_cam camSetTarget [-81860.84,52559.69,13742.96];

_cam camSetPos [5687.91,6309.34,0.28];

_cam camSetFOV 0.174;

_cam camCommit 5;

Sleep 6;

//Shot next to BMP explodes

_cam camSetTarget [84907.30,-49321.77,-24738.43];

_cam camSetPos [5660.05,6321.86,3.13];

_cam camSetFOV 0.7;

_cam camCommit 0;

Sleep 2.5;

BMP setDamage 1.0;

//Final fly and pan

_cam camSetTarget [82322.27,-47506.68,-34744.13];

_cam camSetPos [5652.20,6332.34,4.71];

_cam camCommit 0;

_cam camSetTarget [82322.27,-47506.68,-34744.11];

_cam camSetPos [5659.94,6320.69,6.28];

_cam camCommit 3;

Sleep 3;

_cam camSetTarget [-78368.13,57472.13,-17882.82];

_cam camSetPos [5697.40,6301.60,4.67];

_cam camCommit 3;

Any chance of getting some wisdom regarding what may be going wrong?

Share this post


Link to post
Share on other sites

If that's an exact copy-paste then the script isn't running beyond the first camCommit; the disableAI "AUTOTARGET" line is missing a semi-colon.

You're also not using the cameraEffect command to switch to the camera view so you wouldn't be seeing any of those scenes.

Share this post


Link to post
Share on other sites

Thanks, that was a copy paste and that was a very helpful answer.

Share this post


Link to post
Share on other sites

I got a lot of help on this one so far, and as promised I will post the movie when finished. It is not yet, however, here is the last video I made using this game for the entertainment of all who have helped me out:

GVUtxTYx2PI

Share this post


Link to post
Share on other sites

Okok, my Machinima, Reminiscience is finally finished. I wanted to post in all these support threads so people can see what they were helping me out with.

I thank you all for your help.

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  

×