Jump to content
Sign in to follow this  
nosecone

Editing sample missions from take on editing

Recommended Posts

hi

I have downloaded the sample missions from take on editing and would like to know how you go about using the editor to have a play at editing the mission how do you load the mission in the editor.

Cheers

Rhys

Share this post


Link to post
Share on other sites
hi

I have downloaded the sample missions from take on editing and would like to know how you go about using the editor to have a play at editing the mission how do you load the mission in the editor.

Cheers

Rhys

Where did you get the Sample Mission from? If you got it from the following link, just keep reading... If not, check the following link! ;-)

Mission_Editor:_Sample_Mission

Share this post


Link to post
Share on other sites
Where did you get the Sample Mission from? If you got it from the following link, just keep reading... If not, check the following link! ;-)

Mission_Editor:_Sample_Mission

Thanks for that got it sorted

I would to have a go at creating a large forest fire mission just not sure how to create the fire effect and place it in the editor and choose a location. Any ideas ?

Rhys

Share this post


Link to post
Share on other sites

I saw in another thread, that you downloaded that one Fire Fighting Mission. Open that mission in the editor. Look for the trigger - orange circle labeld jim( or bob, one of those ), and double click it. You will see that it has a 'condition' of damage to 1. This means that it is not destroyed, nor is it healthy. You can copy that, or move it, to the area you want the fire. You can also set the 'a' / 'b' to something like 25 to make it bigger.

You are going to really want to examine that whole mission, and learn about what is doing what in it...

You also have to understand that this mission is heavily coded. A pretty good grasp of game coding will be necessary to complete your task. This is not going to be very easy for a first timer, but if you stick with it, you should be alright...

Share this post


Link to post
Share on other sites

Hi Sven2157

I am making progress just a couple of questions I have changed the unit to tree fire but not sure where to find the entry 'a' / 'b' to something like 25 to make it bigger. I set damage 25 does that make any difference when putting out the fire

Thanks for the help

Rhys

Share this post


Link to post
Share on other sites

@nosecone

My bad, I thought that the fire was a trigger; that is where you would find the 'a' / 'b' sections, in a trigger object.

As far as 'this setdammage = 25' goes, I don't know really. Is there a script for an object with damage 25? Why is damage spelled with 2 'm'? You will have to look at all the code and figure out what is happening.

You may want to download and install Notepad++, as it has more and better features than Windows Notepad. Then you can navigate to your 'Documents\TKOH\mpmissions' folder and open the .EXT & .SQF( CODE ) files for the mission. Here you will find how the logic is programmed.

BTW, have you noticed that the entire game crashes if you crash your helicopter? What is causing that?

Share this post


Link to post
Share on other sites

Hi ,

Really sorry I did these mission just for simple proof of concepts , I wish I had more time to make propper waypoint mission that TOH can allow , it's powerful, feel free to post code if people can help, I don't remember how I made fires etc now sorry , if I get chance I wil download and take look

Share this post


Link to post
Share on other sites

Hi Thromp thanks for the reply

I appreciate that this was created sometime ago I have being playing around and changed fire base to fire tree. Changed the helicopter type to medium (I would love to use the 500 but the buckets to heavy) and the missions works although crashes to desk top if you crash the helicopter.

I would like to set the release of the water a bit higher but not sure what needs to be changed.

I really enjoy the short mission and just trying to increase its size and playability.

I think it has potential and really enjoying take on helicopters

Rhys

Share this post


Link to post
Share on other sites

Hey no worries,

I will try to help you make what you want from it , I will be around tomorrow and take a look , maybe try find the old addons so you can lighten the bucket and maybe adjust the things you need to make a real mission of it all.

Yeah that crashing thing weird , was there right at the beginning , I'll see if I did some bad code or maybe we can get BIS to fix if its engine based fault, I always suspected it was the rope being attached and dead chopper being swapped out for a wreck model , but I'll check.

Share this post


Link to post
Share on other sites
I would like to set the release of the water a bit higher but not sure what needs to be changed.

I really enjoy the short mission and just trying to increase its size and playability.

I think it has potential and really enjoying take on helicopters

@nosecone

Well, have you looked at the files? In the folder 'watered.United_States_H':

  • barrel1.sqs
  • init.sqf
  • mission.sqf
  • rained.sqf
  • rainedout.sqf

For starters, if you open the barrel1.sqs with Notepad++( or Windows Notepad ) you see the following code:

pos = _this 
diss = pos distance jim 
hintsilent format ["this distance jim = %1",diss ]
? (diss < 50 ) : jim setdammage 0
exit

This code basically says this:

"The bucket is located here( pos = _this ), and the distance of the bucket to the fire is XXX meters( diss = pos distance jim ), show a hint/message indicating how far the player/bucket is from the fire( hintsilent format ["this distance jim = %1",diss ] ), when the bucket is less than 50ft of the fire, drop the water and put the fire out( ? (diss < 50 ) : jim setdammage 0 )."

Remember that the original author created the fire and gave it a variable name of Jim. When the code refers to the fire, it calls Jim.

Study this, and then go into the editor and look at the rest of the code, examine the other files and see what they have in them... Start there...

Share this post


Link to post
Share on other sites

Thank you Thromp

Would be great if we could use the Md500 as well

Hi Sven managed to change the height of release to 100, one thing I forgot to do was when I made changes to the mission and saved under another name I did not place the other objects into the new folder so I had not bucket but figured that one out the hard way

Thanks for the help so far

Rhys

Share this post


Link to post
Share on other sites

wow :) , i had a look it really was thrown together on a whim lol.

i guess what i was trying to do was get the pos of the waterdrop using ontimerscript in the drop funtion and if it was less than 50 the make flame out.

what it needs is some gobal damage variable and then this drop of water gets current damage or some kind of fire variable and reduces by .01 or something .

i will try to make a tree that sets on fire and have a go at a better mission lol.

Share this post


Link to post
Share on other sites

I think the misson is a great idea. I moved the mission to a big open area to try a couple of things. I have managed to create several tree_fire units and place them near the original. I can put out the original tree_fire unit, but the other three wont go out. I haven't figured out what I need to do to somehow connect them so I can go back and put them out as well. My weapon off choice is the MD500 would love to see a bucket under that.

Thank heaps for replying and looking into it

Rhys

Share this post


Link to post
Share on other sites

Sorry not have time today but possibly tomorrow,

Try look at the init.sqf , look how I have attached rope , I think you can alter this so your md500 can carry bucket , meaning you can say what weight sim is ,iirc .

Look at barrel.sqs , in Bohemia wiki , search nearestobject your looking to have something like

Objects = nearestobjects = [pos,[],5]

{ damnow = getdammage _x ; _x setdamage damnow - 0.001} for each objects

Real sorry on iPad so the syntax above is prob flawed , however essentially , those water drops when there height is below 2 iirc and are 5 meter from a tree , it will each drop reduce the damage by .001 , I think from memory also , in that rained.sqf , it needs a line before the last }; Like this

Sleep .01;

Hope you understand , if not I try tomorrow to redo mission and addon tree so it has propper fire and can be put out

Share this post


Link to post
Share on other sites

I think I saw in that code that it exits when the fire is put out.

So you could also try for something that looks at the objects and checks whether or not they have a 'set dammage = 1', then exit when all object have 'set dammage = 0'.

Share this post


Link to post
Share on other sites

No worries, thanks for the help so far

This is the info in the init.sqf file

sleep .3;

myRope = ropecreate [bob,"slingload0",20,20,false];

[pete,[0,0,0]] ropeAttachTo myRope ;

br attachto [pete,[0,0,0],"place_inside"];

pete animate ["bottom",1.5];

fr = [bob] execvm "rainedout.sqf";

I have worked out that changing the 20,20 [bob,"slingload0",20,20,false]; shortens or lengthens the rope but can't seem to find the paramater to change the weight

Cheers

Rhys

Edited by nosecone

Share this post


Link to post
Share on other sites

its here :

ropeSetCargoMass [myRope, myCargo, 1138];

https://community.bistudio.com/wiki/ropeSetCargoMass

EDIT

I had an Hour free so i cleaned it all up ,

now mission at seattle

I have made it easier for you to set up new missions , simply move or put more of the firebase objects around trees.

If the fires are going out to quickly change this line in barrel1.sqs

?( pos select 2) < 5 : objec = nearestObjects [pos ,[],30]

to

?( pos select 2) < 5 : objec = nearestObjects [pos ,[],5]

or alternatively if to slow change this

{damnow = getdammage _x ;_x setdammage Damnow -0.001} foreach objec

to

{damnow = getdammage _x ;_x setdammage Damnow -0.01} foreach objec

Here is new mission and New PBO

http://www.filedropper.com/watered-10-12

any questions now, i have updated the old Thread in other section

Edited by Thromp

Share this post


Link to post
Share on other sites

Thanks Thromp

Having trouble downloading the new mission doesn't seem to be on the page, and which folder is the ropeSetCargoMass [myRope, myCargo, 1138]; found in

cheers

Rhys

Share this post


Link to post
Share on other sites

Hmm it's there , try Firefox if you haven't already , It's halfway down page saying download this file with a captcha ,

That line is in the new mission init.sqf file

Share this post


Link to post
Share on other sites

Hi Thromp

Done, for some reason MS internet explorer wouldn't let me but fire fox did. Thank you for taking the time to look into this mission great fun am I able to choose a civilian variant for the light helicopter.

Rhys

Share this post


Link to post
Share on other sites

Hey ,

No worries mate, please use that other thread now, if you have any ideas to improve or simply want to create a propper mission then please feel free to upload it as your own in a new thread in custom mission, you are free to do whatever you want with it , i will help you were i can , just ask

am I able to choose a civilian variant for the light helicopter.

Yes just delete the one thats there and pick a new but call it bob in the init line

have fun

Edited by Thromp

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  

×