Jump to content
Sign in to follow this  
C.T.B Creations

Teleport into vehicle

Recommended Posts

So I have been looking on the wiki, youtube, steam and in general just googling around on how but I can't seem to figure it out, I want to teleport 4 AI and the player into a vehicle that's in a completely different location and like I said I couldn't find a solution which is why I am here. I am still learning as i go.

Share this post


Link to post
Share on other sites
2 minutes ago, Harzach said:

First:
moveInDriver

moveInGunner

moveInCargo

moveInAny

 

Providing information helps to stimulate a meaningful response. What problems are you having? What have you tried?

well. im new to scripting and stuff so i don't know where to put the line of code. i think that's the problem. See i want to have the player wait for the dialogue to end then screen fades to black (which i've already done) and then when it fades out again he is in a truck with the rest of his Team.

Share this post


Link to post
Share on other sites

Your ambition is admirable, but you really should heed @stburr91's advice from your other topic. You are trying to build a skyscraper but you haven't yet learned to build a lean-to. It's a sure path to frustration, and the loss of that aforementioned ambition.

 

Create a new mission file. Place a unit and an empty vehicle. Using the commands posted earlier, try moving the unit into the vehicle's various positions. Once you have that sorted, try it with multiple units.

 

And by all means ask questions along the way, just keep them all in one topic. Creating a new topic for every little question is frowned upon.

  • Like 1

Share this post


Link to post
Share on other sites
3 hours ago, C.T.B Creations said:

See i want to have the player wait for the dialogue to end

 

Maybe you're looking for sleep?

Share this post


Link to post
Share on other sites

Might point out, when one says 'dialogue' here it could be confused by some with display dialog.  Language dialogue is better referred to as chat or conversation.  Are you using simple (unit <type>Chat "text") or using kbTell conversation?

 

-  In the case of chat text, use sleep or another delay.

-  With the conversation system, when using sound files the kb commands or functions help, like kbWasSaid, kbReact or calling BIS_fnc_kbTell.  They wait for sound samples to play.  (My experience is that kbWasSaid has to be run where the unit speaking is local.)  But when not using sound files, conversation kb's complete with the chat displayed and you would use sleep or other delay for added time, allowing people to read the chat.

 

As to where to put your lines of code, it depends on whether you intend it to be SP only, MP hosted or MP dedicated, who is running which commands, and in which scripts the commands are run.  For multiplayer you need to consider each command's locality icons.  Most indicate where the commands need to run and whether effect is local or global.

Share this post


Link to post
Share on other sites

I completely understand the fact that I'm still learning and it might be too much, but I am not making the best skyscraper, I'm making a skyscraper with a low budget and probably a not so good outcome but still a skyscraper. Now since you told me to keep the questions on one topic. Here comes another one. And I know that wiki or youtube or whatever other platforms/websites might already tell me this but I feel like I get the best answer on here. First of all, I am the type of person that needs proper clarification when it comes to anything. And really needs to explain exactly down to the dot (almost) what I need to do. Now all I have is a simple question. Well... It's simple for you, but not me... I figured out the fade to black stuff and the teleport but now I have run into another roadblock. I'll show you. Then explain the problem, for proper clarification because as you said: "Providing information helps to stimulate a meaningful response." https://medal.tv/clips/21344120/d13376cQ0h3k if you look at the clip, after all, the dialogue fades to black, but after there's no sound. I've checked the wiki and all the numbers and what they do in the code but I've changed it and reset about a dozen times. Obviously I should know this, and it is probably very silly to be making. Sorry trying to make a 5 mission campaign when I don't even know the basics of the basics. But to be honest. I'd rather ask everyone here, 100+ questions than giving up or just trying to learn anywhere else, because of my brain =. and i am truly sorry for being such a moron of a person to even go on here and not even take the time to do some research (which I've done) but yeah...

Share this post


Link to post
Share on other sites
4 minutes ago, opusfmspol said:

Might point out, when one says 'dialogue' here it could be confused by some with display dialog.  Language dialogue is better referred to as chat or conversation.  Are you using simple (unit <type>Chat "text") or using kbTell conversation?

 

-  In the case of chat text, use sleep or another delay.

-  With the conversation system, when using sound files the kb commands or functions help, like kbWasSaid, kbReact or calling BIS_fnc_kbTell.  They wait for sound samples to play.  (My experience is that kbWasSaid has to be run where the unit speaking is local.)  But when not using sound files, conversation kb's complete with the chat displayed and you would use sleep or other delay for added time, allowing people to read the chat.

 

As to where to put your lines of code, it depends on whether you intend it to be SP only, MP hosted or MP dedicated, who is running which commands, and in which scripts the commands are run.  For multiplayer you need to consider each command's locality icons.  Most indicate where the commands need to run and whether effect is local or global.

Thanks, and it's SP and what I meant by "I don't know where to put the line of code." is that whenever I look at somebody else's mission I try to learn but I almost never see anything because they use scripts. So when I go to the files they don't just have init.sqf they have a bunch of different ones + init.sqf of course. So i was wondering if i had to create some new file or if a had to put it in a trigger, on the player. or in init.sqf 

Share this post


Link to post
Share on other sites
1 hour ago, C.T.B Creations said:

i was wondering if i had to create some new file or if a had to put it in a trigger, on the player. or in init.sqf 

 

Need to consider scheduled vs. unscheduled environment when using suspension (like sleep, or waitUntil).

 

Editor triggers fall under unscheduled environment.  Init scripts fall under scheduled environment.

 

Share this post


Link to post
Share on other sites
1 hour ago, C.T.B Creations said:

I completely understand the fact that I'm still learning and it might be too much, but I am not making the best skyscraper, I'm making a skyscraper with a low budget and probably a not so good outcome but still a skyscraper. Now since you told me to keep the questions on one topic. Here comes another one. And I know that wiki or youtube or whatever other platforms/websites might already tell me this but I feel like I get the best answer on here. First of all, I am the type of person that needs proper clarification when it comes to anything. And really needs to explain exactly down to the dot (almost) what I need to do. Now all I have is a simple question. Well... It's simple for you, but not me... I figured out the fade to black stuff and the teleport but now I have run into another roadblock. I'll show you. Then explain the problem, for proper clarification because as you said: "Providing information helps to stimulate a meaningful response." https://medal.tv/clips/21344120/d13376cQ0h3k if you look at the clip, after all, the dialogue fades to black, but after there's no sound. I've checked the wiki and all the numbers and what they do in the code but I've changed it and reset about a dozen times. Obviously I should know this, and it is probably very silly to be making. Sorry trying to make a 5 mission campaign when I don't even know the basics of the basics. But to be honest. I'd rather ask everyone here, 100+ questions than giving up or just trying to learn anywhere else, because of my brain =. and i am truly sorry for being such a moron of a person to even go on here and not even take the time to do some research (which I've done) but yeah...

 

Post exactly what commands you are using in your video, and how you are executing them (are you using an init.sqf, or a trigger). 

 

A simple fade should look like this.

 

 

[0,"BLACK",3,1] call BIS_fnc_fadeEffect;

 

sleep 5; 
  
[1,"BLACK",3,1] call BIS_fnc_fadeEffect;

 

 

^^^this will give you a slow fade to black for 3 seconds., then a black screen for 5 seconds, then a slow fade from black for 3 seconds.

Share this post


Link to post
Share on other sites
29 minutes ago, stburr91 said:

 

Post exactly what commands you are using in your video, and how you are executing them (are you using an init.sqf, or a trigger). 

 

A simple fade should look like this.

 

 

[0,"BLACK",3,1] call BIS_fnc_fadeEffect;

 

sleep 5; 
  
[1,"BLACK",3,1] call BIS_fnc_fadeEffect;

 

 

^^^this will give you a slow fade to black for 3 seconds., then a black screen for 5 seconds, then a slow fade from black for 3 seconds.

Im using init.sqf and here is my complete init.sqf file: 

 

enableSentences false;

titleCut ["", "BLACK FADED", 999];
[] Spawn {

Bis_printText =
{
   private["_blocks","_block","_blockCount","_blockNr","_blockArray","_blockText","_blockTextF","_blockTextF_","_blockFormat","_formats","_inputData","_processedTextF","_char","_cursorBlinks","_cursorInvis"];

   _blockCount = count _this;

   _invisCursor = "<t color ='#00000000' shadow = '0'>_</t>";

   //process the input data
   _blocks = [];
   _formats = [];

   {
       _inputData = _x;

       _block     = [_inputData, 0, "", [""]] call BIS_fnc_param;
       _format = [_inputData, 1, "<t align = 'center' shadow = '1' size = '0.7'>%1</t><br/>", [""]] call BIS_fnc_param;

       //convert strings into array of chars
       _blockArray = toArray _block;
       {_blockArray set [_forEachIndex, toString [_x]]} forEach _blockArray;

       _blocks  = _blocks + [_blockArray];
       _formats = _formats + [_format];
   }
   forEach _this;

   //do the printing
   _processedTextF  = "";

   {
       _blockArray  = _x;
       _blockNr      = _forEachIndex;
       _blockFormat = _formats select _blockNr;
       _blockText   = "";
       _blockTextF  = "";
       _blockTextF_ = "";

       {
           _char = _x;

           _blockText = _blockText + _char;

           _blockTextF  = format[_blockFormat, _blockText + _invisCursor];
           _blockTextF_ = format[_blockFormat, _blockText + "_"];

           //print the output
           [(_processedTextF + _blockTextF_), 0, 0.15, 5, 0, 0, 90] spawn BIS_fnc_dynamicText;
           playSound "click";
           sleep 0.08;
           [(_processedTextF + _blockTextF), 0, 0.15, 5, 0, 0, 90] spawn BIS_fnc_dynamicText;
           sleep 0.02;
       }
       forEach _blockArray;

       if (_blockNr + 1 < _blockCount) then
       {
           _cursorBlinks = 5;
       }
       else
       {
           _cursorBlinks = 15;
       };

       for "_i" from 1 to _cursorBlinks do
       {
           [_processedTextF + _blockTextF_, 0, 0.15, 5, 0, 0, 90] spawn BIS_fnc_dynamicText;
           sleep 0.08;
           [_processedTextF + _blockTextF, 0, 0.15, 5, 0, 0, 90] spawn BIS_fnc_dynamicText;
           sleep 0.02;
       };

       //store finished block
       _processedTextF  = _processedTextF + _blockTextF;
   }
   forEach _blocks;

   //clean the screen
   ["", 0, 0.15, 5, 0, 0, 90] spawn BIS_fnc_dynamicText;
};

[
   ["BRIEFING, CAMP FOXTROT","<t align = 'center' shadow = '1' size = '0.7'>%1</t><br/>"],
   ["2020.3.29.","<t align = 'center' shadow = '1' size = '1.0'>%1</t><br/>"]
] spawn Bis_printText;  

sleep 8;

titleCut ["", "BLACK IN", 5];

sleep 20;

[0, "BLACK", 5, 0] spawn BIS_fnc_fadeEffect;

sleep 5;

[str ("CAMP MAXWELL"), str("10 MINUTES LATER"), str(2020) + "." + str(3) + "." + str(29)] spawn BIS_fnc_infoText;

kerry moveInAny truckone;

sleep 6;

titleCut ["", "BLACK IN", 5];

};                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Share this post


Link to post
Share on other sites
14 minutes ago, C.T.B Creations said:

Im using init.sqf and here is my complete init.sqf file: 

 

enableSentences false;

titleCut ["", "BLACK FADED", 999];
[] Spawn {

Bis_printText =
{
   private["_blocks","_block","_blockCount","_blockNr","_blockArray","_blockText","_blockTextF","_blockTextF_","_blockFormat","_formats","_inputData","_processedTextF","_char","_cursorBlinks","_cursorInvis"];

   _blockCount = count _this;

   _invisCursor = "<t color ='#00000000' shadow = '0'>_</t>";

   //process the input data
   _blocks = [];
   _formats = [];

   {
       _inputData = _x;

       _block     = [_inputData, 0, "", [""]] call BIS_fnc_param;
       _format = [_inputData, 1, "<t align = 'center' shadow = '1' size = '0.7'>%1</t><br/>", [""]] call BIS_fnc_param;

       //convert strings into array of chars
       _blockArray = toArray _block;
       {_blockArray set [_forEachIndex, toString [_x]]} forEach _blockArray;

       _blocks  = _blocks + [_blockArray];
       _formats = _formats + [_format];
   }
   forEach _this;

   //do the printing
   _processedTextF  = "";

   {
       _blockArray  = _x;
       _blockNr      = _forEachIndex;
       _blockFormat = _formats select _blockNr;
       _blockText   = "";
       _blockTextF  = "";
       _blockTextF_ = "";

       {
           _char = _x;

           _blockText = _blockText + _char;

           _blockTextF  = format[_blockFormat, _blockText + _invisCursor];
           _blockTextF_ = format[_blockFormat, _blockText + "_"];

           //print the output
           [(_processedTextF + _blockTextF_), 0, 0.15, 5, 0, 0, 90] spawn BIS_fnc_dynamicText;
           playSound "click";
           sleep 0.08;
           [(_processedTextF + _blockTextF), 0, 0.15, 5, 0, 0, 90] spawn BIS_fnc_dynamicText;
           sleep 0.02;
       }
       forEach _blockArray;

       if (_blockNr + 1 < _blockCount) then
       {
           _cursorBlinks = 5;
       }
       else
       {
           _cursorBlinks = 15;
       };

       for "_i" from 1 to _cursorBlinks do
       {
           [_processedTextF + _blockTextF_, 0, 0.15, 5, 0, 0, 90] spawn BIS_fnc_dynamicText;
           sleep 0.08;
           [_processedTextF + _blockTextF, 0, 0.15, 5, 0, 0, 90] spawn BIS_fnc_dynamicText;
           sleep 0.02;
       };

       //store finished block
       _processedTextF  = _processedTextF + _blockTextF;
   }
   forEach _blocks;

   //clean the screen
   ["", 0, 0.15, 5, 0, 0, 90] spawn BIS_fnc_dynamicText;
};

[
   ["BRIEFING, CAMP FOXTROT","<t align = 'center' shadow = '1' size = '0.7'>%1</t><br/>"],
   ["2020.3.29.","<t align = 'center' shadow = '1' size = '1.0'>%1</t><br/>"]
] spawn Bis_printText;  

sleep 8;

titleCut ["", "BLACK IN", 5];

sleep 20;

[0, "BLACK", 5, 0] spawn BIS_fnc_fadeEffect;

sleep 5;

[str ("CAMP MAXWELL"), str("10 MINUTES LATER"), str(2020) + "." + str(3) + "." + str(29)] spawn BIS_fnc_infoText;

kerry moveInAny truckone;

sleep 6;

titleCut ["", "BLACK IN", 5];

};                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

 

You faded out using,  [0, "BLACK", 5, 0] spawn BIS_fnc_fadeEffect;  which also fades the sound out. You faded back in with,  titleCut ["", "BLACK IN", 5];  which does not fade the sound back in.

 

Replace the red highlighted part of your script with this.

 

[1, "BLACK", 5, 0] spawn BIS_fnc_fadeEffect;

 

 

 

Note the first number. 0 fades out (including the sound) and 1 fades back in.

 

[0, "BLACK", 5, 0] spawn BIS_fnc_fadeEffect;

 

[1, "BLACK", 5, 0] spawn BIS_fnc_fadeEffect;

 

 

Does this make sense to you?

 

 

Share this post


Link to post
Share on other sites
 
 
 
🤓
2
1 minute ago, stburr91 said:

 

You faded out using,  [0, "BLACK", 5, 0] spawn BIS_fnc_fadeEffect;  which also fades the sound out. You faded back in with,  titleCut ["", "BLACK IN", 5];  which does not fade the sound back in.

 

Replace the red highlighted part of your script with this.

 

[1, "BLACK", 5, 0] spawn BIS_fnc_fadeEffect;

 

 

 

Note the first number. 0 fades out (including the sound) and 1 fades back in.

 

[0, "BLACK", 5, 0] spawn BIS_fnc_fadeEffect;

 

[1, "BLACK", 5, 0] spawn BIS_fnc_fadeEffect;

 

 

Does this make sense to you?

 

 

Yes, it said that on the wiki except for the sound part. Thank you. I'll try it out! 😄

Share this post


Link to post
Share on other sites

Alright. You know what i want... Now... google provides me with the opposite. So I want my player to complete a task when he gets out of a vehicle. But I've only seen the "player in car;" code. Can I just do "player out car;"? xD or "!player in car;" or something like that?

Share this post


Link to post
Share on other sites
46 minutes ago, C.T.B Creations said:

Alright. You know what i want... Now... google provides me with the opposite. So I want my player to complete a task when he gets out of a vehicle. But I've only seen the "player in car;" code. Can I just do "player out car;"? xD or "!player in car;" or something like that?

 

Put this in the condition field of your trigger that will complete the task.

 

 !(player in truckone)

 

 

 

 

Share this post


Link to post
Share on other sites
26 minutes ago, C.T.B Creations said:

Can I just do "player out car;"? xD or "!player in car;" or something like that?

 

!(player in car)

 

With In command, use brackets to get the Boolean before reversing it.

Share this post


Link to post
Share on other sites
8 minutes ago, opusfmspol said:

 

!(player in car)

 

With In command, use brackets to get the Boolean before reversing it.

None of them is working.

Share this post


Link to post
Share on other sites
5 minutes ago, C.T.B Creations said:

None of them is working.

 

What is the name of your vehicle? If it is, truckone,  use this

 

 !(player in truckone)

 

Make sure you put this in the condition field of the trigger. 

Share this post


Link to post
Share on other sites
3 minutes ago, stburr91 said:

 

What is the name of your vehicle? If it is, truckone,  use this

 

 !(player in truckone)

 

Make sure you put this in the condition field of the trigger. 

It is truckone. Hold on imma test it again

Share this post


Link to post
Share on other sites
4 minutes ago, stburr91 said:

 

What is the name of your vehicle? If it is, truckone,  use this

 

 !(player in truckone)

 

Make sure you put this in the condition field of the trigger. 

Is the "Create Task" module supposed to be "Synchronized Objects" or another one? and what Activation Team should i have on the trigger? I have it on BLUEFOR since Kerry (The Player) is BLUEFOR, NATO

Share this post


Link to post
Share on other sites

I think your problem is the trigger is firing at the mission start because the player is not in truckone at mission start.

 

You're going to have to add another condition to your trigger.

 

Put your trigger where truckone stops, and you want the player to get out.

 

In the trigger select any player present.

 

The put this in the trigger condition field.

 

this && !(player in truckone)

 

 

 

 

Share this post


Link to post
Share on other sites
4 minutes ago, stburr91 said:

I think your problem is the trigger is firing at the mission start because the player is not in truckone at mission start.

 

You're going to have to add another condition to your trigger.

 

Put your trigger where truckone stops, and you want the player to get out.

 

In the trigger select any player present.

 

The put this in the trigger condition field.

 

this && !(player in truckone)

 

 

 

 

Yes, im not in the truck at mission start. But just so we are clear. The Trigger is at the exact same pos as the "Move" waypoint?

Share this post


Link to post
Share on other sites
24 minutes ago, C.T.B Creations said:

Yes, im not in the truck at mission start. But just so we are clear. The Trigger is at the exact same pos as the "Move" waypoint?

 

 

Yes, make sure the trigger big enough to be sure that truckone drives into it.

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  

×