Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
monyetswa

Unitplay in Intro/Outro

Recommended Posts

I have a unitplay which executes perfectly in Mission mode via a Trigger (OPFOR Present in their initial positions).

I want this movement to be played in the Intro, so I copied everything from Mission mode into the intro, same positions, same trigger, etc.

I set up a still camera and call my first scene, expecting to see the unitplay action, but it never triggers.

I have tried:

-renaming everything (i thought, maybe a conflict between Into and Mission modes

-using every possible trigger imaginable.

-typing the unitplay codes from the .sqs and .sqf files directly into the trigger

-using execVM, exec, and compile preprocessFile on my "path.sqf" of the unitplay sequence

Nothing seems to trigger the unitplay.

Is it impossible to use this function in Intro/Outro mode?

---------- Post added at 04:59 AM ---------- Previous post was at 04:52 AM ----------

Just to give a more detailed idea, here is what i have:

INIT.SQF

MyPath = compile preprocessFile "path.sqf";

PATH.SQF

Path1 = [the huge movement data];
[spurdo1, Path1] spawn BIS_fnc_UnitPlay;

on the Intro mode Map i have my vehicle, spurdo1, and my camera set.

then i have a trigger:

rec = [] spawn Mypath;

the trigger goes when there are OPFOR present on the map, which there is, so it triggers. It works in mission mode, doesnt in Intro mode.

Share this post


Link to post
Share on other sites

Hi there,

I'm fairly sure Intro part of SP missions do not execute init.sqf etc.

In order to use this Intro, you'll need to use it's own init file, called initIntro.sqf.

initIntro.sqf works pretty much like init.sqf, if the file exists in the mission root folder, it will get executed when Intro is launched.

_neo_

Share this post


Link to post
Share on other sites

Neo is absolutely right, I have used unitplay with initIntro.sqf many times. Outros, however, don't have an automatically called file that I am aware of, but I think you could initialize the path data from a game logic. I never use outros though.

Share this post


Link to post
Share on other sites

thanks for the replies. initIntro works.

just a note, another thing i found:

taking the script from init.sqf and placing it in the trigger will not start the uniplay, however, replacing " compile preprocessFile" with "player exec" will make it work.

MyPath = player exec "path.sqf";

I'm not sure of any negative consequences of this; But since you say Outros do not have an init.sqf, perhaps this might be useful if someone wants to trigger Unitplay in the outro.

Share this post


Link to post
Share on other sites
thanks for the replies. initIntro works.

just a note, another thing i found:

taking the script from init.sqf and placing it in the trigger will not start the uniplay, however, replacing " compile preprocessFile" with "player exec" will make it work.

MyPath = player exec "path.sqf";

I'm not sure of any negative consequences of this; But since you say Outros do not have an init.sqf, perhaps this might be useful if someone wants to trigger Unitplay in the outro.

So you put it to the Init or trigger?

Share this post


Link to post
Share on other sites
Sign in to follow this  

×