Home   Help Search Login Register  

Author Topic: Two questions  (Read 3234 times)

0 Members and 1 Guest are viewing this topic.

Offline Rytuklis

  • Members
  • *
Two questions
« on: 13 Sep 2012, 20:09:25 »
First question

How do i make an drop off scene. What i mean is that soldiers are flying with a helicopter, then a pilot would land, as soon as they get out it would fly away..?

Second question.

I have a problem with hiding a briefing task.

This is my briefing code

Code: [Select]

// A2BM E     110
// DO NOT EDIT THIS FILE

waitUntil {!(isNull player)};
waitUntil {player==player};
switch (side player) do
{
case WEST:
{
};
case EAST:
{
player createDiaryRecord ["Diary",["Drop off point","You will be dropped off at 009-125. You will have to move to Kamenka on foot."]];
player createDiaryRecord ["Diary",["Enemy locations","Small groups of enemy patrols are scattered all over Kamenka"]];
MAG_tskObj3=player createSimpleTask ["Destroy enemy armour"];
MAG_tskObj3 setSimpleTaskDescription ["Enemy armour is headed to Kamenka. Destroy it.","Destroy enemy armour","Destroy enemy armour"];
MAG_tskObj2=player createSimpleTask ["Find enemy patrol posts"];
MAG_tskObj2 setSimpleTaskDescription ["Seems like there are some enemy patrol posts located somewhere around Kamenka. Your best bet would be to search the forests to the north. Find and destroy these patrols.","Find enemy patrol posts","Find enemy patrol posts"];
MAG_tskObj1=player createSimpleTask ["Locate and destroy enemy radio transmitters"];
MAG_tskObj1 setSimpleTaskDescription ["There are three radio transmitters deployed all around the village of Kamenka. Find them and destroy them so enemy cannot call reinforcements.","Locate and destroy enemy radio transmitters","Locate and destroy enemy radio transmitters"];
MAG_tskObj0=player createSimpleTask ["Seize Kamenka"];
MAG_tskObj0 setSimpleTaskDescription ["One of the smallest villages in Chernarus - Kamenka. However, the village is very important due to its location - Chernarussian Socialist Party troops use this village to observe the coast line for possible enemy threat. We must seize that village to have a tactical advantage.","Seize Kamenka","Seize Kamenka"];
};
case RESISTANCE:
{
};
case CIVILIAN:
{
};
};

This is my init.sqs code:

Code: [Select]
; ****************************************************************
; Script file for Armed Assault
; Created by: TODO: Author Name
; ****************************************************************

"MAG_tskObj2" objStatus "HIDDEN"
"MAG_tskObj3" objStatus "HIDDEN"

The task still wouldnt be hidden when in game.

Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: Two questions
« Reply #1 on: 14 Sep 2012, 01:23:55 »
First answer is.....Search! :D
No, but seriously.
#1
Move the units into your helo with a getout waypoint at the LZ. Add a transportunload waypoint to the helo at the same point. Sync the two waypoints and voila!


#2
Check this command out

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: Two questions
« Reply #2 on: 14 Sep 2012, 08:53:07 »
With regards to # 2, yes: you need to create new tasks when you need them, you can't (AFAIK) create them and then "hide" them.

The way I do it is usually as an extension of the initial briefing.sqf: I simply add a waitUntil {yourVariable} after I've added the stuff they're supposed to see from the map screen, and then yourVariable = true inside the mission somewhere, at which point briefing.sqf can continue, adding new objectives etc. :) Sure it means having a script constantly running in the background (waitUntils are a little resource heavy) but as long as you haven't got a lot of them you'll be fine.

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline Rytuklis

  • Members
  • *
Re: Two questions
« Reply #3 on: 14 Sep 2012, 13:06:02 »
First answer is.....Search! :D
No, but seriously.
#1
Move the units into your helo with a getout waypoint at the LZ. Add a transportunload waypoint to the helo at the same point. Sync the two waypoints and voila!


#2
Check this command out


This isnt working... The helicopter spawns in the air, and youre supposed to spawn in it too. If i use your method, my soldiers spawn in water.

Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: Two questions
« Reply #4 on: 14 Sep 2012, 14:42:16 »
It isn't working because when objects spawn, they are hard coded, not to collide. You must spawn the units and then move them into the helo after spawn.

I was simply jesting in my earlier post when I told you to search because this is one of the most used commands in missions since the dawn of BI titles. I would seriously recommend to you to expend time searching our forum database that consists of over a decade of shared knowledge and then to become familiar with the commands used by the engine. That command reference is an essential tool for all editors and I frequent it often since every title brings with it, awesome new commands that improve the functionality of our beloved titles.

When you have searched and hunted to a dead end, then be free to posts your issues here for all to help out with. Once the answer has been found, update your post with the discovery to help future editors in their own journeys. Thanks pal.