Jump to content
Sign in to follow this  
AgentJonathan

Scrip Probs (Again...)

Recommended Posts

For the duration of my "time away", ive been practicing scripting... But I had a problem with this script crazy_o.gif

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

titletext [" ", "BLACK IN", 5]

_cam = "camera" camCreate [0,0,0]

_cam cameraeffect ["internal", "back"]

playmusic "Track5"

_cam camsettarget Dumas

_cam camsetrelpos [0,3,5]

_cam camsetFOV 0.500

_cam camcommit 0

TitleText ["''I am on patrol today.''", "PLAIN DOWN"]

_cam camsettarget Dumas

_cam camsetrelpos [0,3,1]

_cam camsetFOV 0.200

_cam camcommit 12

~7

TitleText ["''I am waiting until my 'time'.''", "PLAIN DOWN"]

~6

titleText [" ", "BLACK OUT", 2]

~5

skiptime 3.75

~5

titletext [" ", "BLACK IN", 9]

camdestroy _cam

_cam2 "camera" camcreate

_cam2 cameraeffect ["internal", "back"]

_cam2 camsettarget rick

_cam2 camsetrelpos [0,0,1]

_cam2 camsetFOV 0.900

_cam2 camcommit 0

cutrsc ["binocular", PLAIN, 0]

titleText ["Scout Team: ''Yes sir, those Russian bootlickers are right there!''", "PLAIN DOWN"]

~7

titletext ["You: ''So it's a go?''", "PLAIN DOWN"]

~4

titletext ["Scout Team: ''Aye! It's a go.''", "PLAIN DOWN"]

~5

titletext [" ", "BLACK OUT", 1]

cutrsc ["default", "PLAIN", 0]

~2

titletext [" ", "BLACK IN", 2]

INTRO_END = true

_cam2 cameraeffect ["terminate", "back"]

camdestroy _cam2

cutrsc ["binocular", PLAIN, 0] , didnt work.

This part was supposed to switch the cam view to a binocular view, but it kept saying it doesn't work...

Any help will be appreciated. THX. yay.gif

Share this post


Link to post
Share on other sites

You should have "" around PLAIN.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

cutrsc ["binocular", "PLAIN", 0]

Macser smile_o.gif

Share this post


Link to post
Share on other sites

another question for the same thing... _cam2 didn't work and i didint wanna have the camera take forever getting to locacion 2 (Which is rick) THZ AGAIN

Share this post


Link to post
Share on other sites

Unfortunately,I'm not too familiar with camera scripting.

I just saw the typo and thought I should point it out. smile_o.gif

Share this post


Link to post
Share on other sites
Quote[/b] ]_cam2 "camera" camcreate

_cam2 cameraeffect ["internal", "back"]

well to start with you don't have a position where your camera2 is created e.g. [0,0,0]

As for camera 1 to get there quickly

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_cam camcommit 0.1

should do...

you don't need to make a new cam *duh* biggrin_o.gif

Share this post


Link to post
Share on other sites

doesn't _cam2 have to be properly defined too?

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_cam2= "camera" camcreate [x,x,x]

instead of

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_cam2 "camera" camcreate

Share this post


Link to post
Share on other sites

Yeah, dang! I'm new with this so I don't know much. Plus my age is another thing to excuse maself with...

Share this post


Link to post
Share on other sites

I have another script prob in the same mission... My scud won't launch!(WAH!!! sad_o.gif )

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_scud = _this Select 0

_wait = _this Select 1

?(_wait < 10): _wait = 10

_scud Action ["SCUD LAUNCH"]

~5

?(Not(Alive _scud)): Exit

_scud Action ["SCUD START"]

Exit

i inserted it like this into the mission:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[this] exec "scud.sqs"

Any help shall be appreciated. notworthy.gif

Share this post


Link to post
Share on other sites

Try this in a trigger with the appropriate condition.

In on activation put [scud] exec "scud.sqs".

(make sure you have a unit called "scud")

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_scud = _this Select 0

?!(Alive _scud): Exit

_scud Action ["SCUD LAUNCH"]

~4

_scud Action ["SCUD start"]

Exit

Just so you know,

" ? " means if.

"!" means not".

So basically,

"?!" means "If not".

Do you see?

In your case the extra brackets aren't nescessary

in the "alive" condition.Keeps things neater.

Hope that helps.

Macser smile_o.gif

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  

×