Home   Help Search Login Register  

Author Topic: Problem with cut rsc, can't get it to show efffect  (Read 1831 times)

0 Members and 1 Guest are viewing this topic.

OFP Director

  • Guest
Problem with cut rsc, can't get it to show efffect
« on: 29 Sep 2003, 00:14:01 »
Hi all,

i am trying to get a part of an intro to play through a dragunov scope i used this line in my intro.sqs

cutrsc ["Dragunov","PLAIN",1000]

and here is the part of my description.ext

Code: [Select]
class RscObject
{
type = CT_OBJECT;
scale = 1.0;
direction[] = {0, 0, 1};
up[] = {0, 1, 0};
};

class RscTitles
{

titles[] =
{
Dragunov
};

class Dragunov
{
idd=-1; // ID ... always -1
movingEnable = false; // always false
duration=100; // time of the effect (in seconds)
name = "Dragunov";

// max. three arrays - controls, controlsBackground (optional), objects (optional)
// for now - we will only use "controls"

objects[]= {Dragunov};

class Dragunov : RscObject
{
model= "\O\Guns\opt_snip_noflash.p3d";
idc=-1;
position[] = {0,0,0.063};
direction[] = {sin 0, sin 180 * cos 0, cos 180 * cos 0};
up[] = {0, cos 180, -sin 180};
};
};

Before i added the rsc object the game would ctd and give me an error message that i have since sorted out. but, when the script gets to the part thats supposed to show the scope view it stays at normal view.

any ideas whats wrong?

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Problem with cut rsc, can't get it to show efffect
« Reply #1 on: 29 Sep 2003, 13:00:43 »
Heya Winters mate ;)

Have you defined CT_OBJECT at the start of your .ext file?

OFP Director

  • Guest
Re:Problem with cut rsc, can't get it to show efffect
« Reply #2 on: 29 Sep 2003, 19:18:22 »
Hi Sui,

Thanks for helping,
I copied that code from the first scene in Resistance. Am i missing something? that excerpt was at the end of my description.ext does it need to be listed at the top?

Using a cutrsc is new to me and i would appreciate any input you could offer.


*Edit: nevermind, i know what your talking about nnow and the answer was no i didnt, gonna give it another go and see what happens now.
« Last Edit: 30 Sep 2003, 22:05:21 by *Winters* »

OFP Director

  • Guest
Re:Problem with cut rsc, can't get it to show efffect
« Reply #3 on: 30 Sep 2003, 23:14:27 »
damn, still wont work  :'(

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Problem with cut rsc, can't get it to show efffect
« Reply #4 on: 03 Oct 2003, 09:40:57 »
Hmm... I think you may have to use cutobj rather than rsc...

I've had more experience using resources than object, and I'm not entirely sure how it all relates :P

OFP Director

  • Guest
Re:Problem with cut rsc, can't get it to show efffect
« Reply #5 on: 03 Oct 2003, 18:31:54 »
Is it possible for me to replicate what you did in the "Facile Ground" intro and just substitute the shilka sight with a dragunov one?

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Problem with cut rsc, can't get it to show efffect
« Reply #6 on: 04 Oct 2003, 02:14:39 »
Yeap... easily.

The line that changed the camera perspective to the shilka sight was:

shilka switchcamera "gunner"

If you were to get yourself a sniper, and use the same line (substituting shilka for the name of the sniper), you'd get whatever the sniper is looking at through their rifle ;)


I'm keen to get that object going though... I'll definately be having a play around with that once I find a bit of time ;D

Unnamed

  • Guest
Re:Problem with cut rsc, can't get it to show efffect
« Reply #7 on: 04 Oct 2003, 02:33:32 »
Quote
If you were to get yourself a sniper, and use the same line (substituting shilka for the name of the sniper), you'd get whatever the sniper is looking at through their rifle

It may have to be:

Code: [Select]
Sniper1 SwitchCamera "Internal"
And you have to get him in combat mode, never tried "Gunner". But I guess the same will apply for his mode?

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Problem with cut rsc, can't get it to show efffect
« Reply #8 on: 04 Oct 2003, 06:05:08 »
Well... not so much.


"Gunner" is the optics view... what you see when you push V (by default) and get the iron sights up. However you've got the right idea... he won't always bring up the gunsight view.

It's not so much his behaviour/combatmode that effects it, it's whether he's looking down the sight or not. Provided there are targets downrange that he knows about (it doesn't matter if they're setcaptived or not), and he's targetting them, you'll end up with a view of the gunsight ;)
« Last Edit: 04 Oct 2003, 06:17:22 by Sui »

Unnamed

  • Guest
Re:Problem with cut rsc, can't get it to show efffect
« Reply #9 on: 04 Oct 2003, 13:41:41 »
Yeah, looks like gunner works in exactly the same way as internal, at least when it comes to infantry.

I'm a big fan of SwitchCamera, but I did notice something weird.

I tried to switchcam to an AI I had moved into cargo at the start of a mission, it wasn't in the same group as the driver ot the vehicle. The view was as if the guy had never got in (even though he had), and he just watched the jeeps drive away.

It looked like some sort of out of body experience :)

OFP Director

  • Guest
Re:Problem with cut rsc, can't get it to show efffect
« Reply #10 on: 06 Oct 2003, 17:08:42 »
Well... not so much.


"Gunner" is the optics view... what you see when you push V (by default) and get the iron sights up. However you've got the right idea... he won't always bring up the gunsight view.

It's not so much his behaviour/combatmode that effects it, it's whether he's looking down the sight or not. Provided there are targets downrange that he knows about (it doesn't matter if they're setcaptived or not), and he's targetting them, you'll end up with a view of the gunsight ;)


I tried it with switchcamera a while back, the best i got was a momentary flash on the screen and then it went right back to the regular cinema view.

I will play around with yours and Unnamed's suggestions and see if that will work.

Thanks  :)

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Problem with cut rsc, can't get it to show efffect
« Reply #11 on: 09 Oct 2003, 10:51:40 »
Ahh... righto, if it's during a cutscene you may need to terminate your camera while using the switchcamera command.

I generally do something like:

sniper switchcamera "gunner"
_cam cameraeffect ["terminate","back"]
camdestroy _cam
~20
_cam = "camera" camcreate [0,0,0]
_cam camsetpos pos
_cam camsettarget target
_cam camcommit 0
player switchcamera "internal"

which should mean that the camera doesn't interfere with the switchcam... (I hope ;D)