Home   Help Search Login Register  

Author Topic: A simple question - please help.  (Read 652 times)

0 Members and 1 Guest are viewing this topic.

Zahael

  • Guest
A simple question - please help.
« on: 23 Oct 2002, 13:33:31 »
Hi guys, I am trying to make an intro for a mission.  I have made the mission but the intro is proving to be problematic because I can't even get it off the ground.

I have a few problems.

I have a bunch of guys on parade in front of their commanding officer.  In order to get the guys to stand at attention, I made a small script with

_soldier = _this select 0

_soldier switchmove "FXStandAtt"

exit

written in it.  Playmove doesn't work so it is all or nothing.

The problem with this is that the chunk on the computer is unfuckingbelievable.  when operating with the intro sub category is it always that bad or is it because I have about twenty guys using the one script?  Is there anyway to get around calling the script?  switchmove or playmove doesn't work in the init fields of the soldiers.

The second and more serious problem is me trying to make the actual cutscene.  I can't get the camera script to work.  What happens is that straight off the mission loading up I call the script intro.  Nothing happens.  No camera is created or anything.

What could be the possible explanations for this?  Here is my code.

_object = _this select 0   

_camx = getpos _Object select 0
_camy = getpos _Object select 1
_camz = getpos _Object select 2

_cam = "camera" CamCreate [_camx, _camy +5, _camz +5]
_cam CamSetTarget _Object
_cam CameraEffect ["internal", "Black"]
_cam CamCommit 0

~10

_cam CameraEffect ["terminate", Back"]
camdestroy _cam
exit


Could someone look at this and tell me why it might not work?

Thanks everyone

Zahael

karz

  • Guest
Re:A simple question - please help.
« Reply #1 on: 23 Oct 2002, 17:42:26 »
About that switchMove-thing, make a trigger that covers every guy you want to stand in attention. make it:

Everybody
Present

And write this in the onactiv. field:
"_x switchMove ""FXStandAtt""" foreach thislist

Inlcuding all the quotes  :o

Offline KTottE

  • Former Staff
  • ****
Re:A simple question - please help.
« Reply #2 on: 23 Oct 2002, 22:03:25 »
Quote
_object = _this select 0  

_camx = getpos _Object select 0
_camy = getpos _Object select 1
_camz = getpos _Object select 2

_cam = "camera" CamCreate [_camx, _camy +5, _camz +5]
_cam CamSetTarget _Object
_cam CameraEffect ["internal", "Black"]
_cam CamCommit 0

~10

_cam CameraEffect ["terminate", Back"]
camdestroy _cam
exit

Take that, and change it to this

Quote
_cam = "camera" CamCreate [0,0,0]
_cam CameraEffect ["internal", "Black"]
_cam CamSetTarget UnitID
_cam CamSetRelPos[0,5,5]
_cam CamCommit 0
~10

_cam CameraEffect ["terminate", Back"]
camdestroy _cam
exit

As you do not want to be executing your camera script using the [] exec "ScriptName.sqs" function, you'll be doing this exec "ScriptName.sqs" instead, and just substitute the UnitID for the name of the unit which you want to be looking at.
Also, remember to put the exec call in the player's init field.
"Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming 'WOW What a Ride!'"