Jump to content
Nope.X

[SOLVED] Script to finish a mission when vehicles are loaded

Recommended Posts

Hello,

 

so I've created my fairly long mission in the Eden Editor and everything worked fine until the point where I wanted the player to load 2 Marshalls in 2 Blackfishes it for the purpose of my mission can't matter in which the blackfish the marshalls are.

I've already tried a few things like this: (Marshall1 in Blackfish1 OR Marshall1 in Blackfish2) AND (Marshall2 in Blackfish2 OR Marshall2 in Blackfish1)

That evidently didn't work hence this post. I also because of the tests I made found out that marshalls aren't actually inside the blackfishes.

I did my own research but either I couldn't understand it or it didn't fit my needs.

 

Hopefully somebody here can help me with this.

 

Thank you in advance.

Share this post


Link to post
Share on other sites
(Marshall1 in (getVehicleCargo Blackfish1) || Marshall1 in (getVehicleCargo Blackfish2)) &&
(Marshall2 in (getVehicleCargo Blackfish1)|| Marshall2 in (getVehicleCargo Blackfish2))

or

_cargo = ((getVehicleCargo Blackfish1) + (getVehicleCargo Blackfish2));
(Marshall1 in _cargo && {Marshall2 in _cargo})

 

  • Like 3

Share this post


Link to post
Share on other sites
13 hours ago, davidoss said:

(Marshall1 in (getVehicleCargo Blackfish1) || Marshall1 in (getVehicleCargo Blackfish2)) &&
(Marshall2 in (getVehicleCargo Blackfish1)|| Marshall2 in (getVehicleCargo Blackfish2))

or


_cargo = ((getVehicleCargo Blackfish1) + (getVehicleCargo Blackfish2));
(Marshall1 in _cargo && {Marshall2 in _cargo})

 

@davidoss

Edit 1: First of all thank you!

Edit 2: Got it thank you again!

 

So do I just paste one of those in the trigger? If so in which field of the trigger?

Edited by Nope.X

Share this post


Link to post
Share on other sites

condition field.

If the trigger should react for something else defined in Type or Activation you need to ad >this &&< before

  • Like 1

Share this post


Link to post
Share on other sites

Okay, another question how can I have a trigger activate upon two vehicles being in a trigger at the same time? @davidoss

Share this post


Link to post
Share on other sites

@davidoss I've now tried this: Marshall1 in thisList && Marshall2 in thisList which didn't work do I need to change anything in the triggers setting?

I've already triple checked the task but once I move both Marshalls in the triggers area nothing happened.

Share this post


Link to post
Share on other sites

You need to write something that the trigger should do for you. In on activation.

Thislist will only work if the trigger will search for object (activation anybody and type present)

For NONE use condition like this:

 

Marshall1 inarea thistrigger && Marshall2 inarea thistrigger

 

  • Thanks 1

Share this post


Link to post
Share on other sites

Oh come on its  basic stuff .. If i am genius for knowing this who such Larow will be?

Really there are some scriptwriters that could be called an genius where  i barely can understand theses work..

  • Like 1

Share this post


Link to post
Share on other sites

@davidoss

I might've over exaggerated a tiny bit :)

But you've just saved my scenario in which I already put in 30 hours of building, tasks and testing. I basically was very excited back then.

Edited by Nope.X
  • Like 1

Share this post


Link to post
Share on other sites
Just now, Nope.X said:

end a task upon a player picking up a rocketlauncher?

 

Give the launcher a variable name (say RL). Module createtask synced to settaskstate synced to trigger. In trigger condition field add  !alive RL

  • Like 1

Share this post


Link to post
Share on other sites
Just now, Nope.X said:

Can I also give variable names to items in crates?

Not that I know of but not saying it isn't possible.

Share this post


Link to post
Share on other sites

its not because they are "virtual".

If you add varname to an weapon object and put into box inventory and pick up back this will be no more the same object (no varname)

Share this post


Link to post
Share on other sites

@davidoss Thank you. But do you know how I can detect if a vehicle is no longer touching the ground?

Share this post


Link to post
Share on other sites
On 14/11/2018 at 5:48 PM, Nope.X said:

@davidoss one last question how can I end a task upon a player picking up a rocketlauncher?

 

Specific or any launcher?

If any: currentweapon player == secondaryWeapon player  // player has selected a launcher

or

 secondaryWeapon player != ""  // player has a launcher

 

Specific, it's more difficult because in crate (so in inventory) you just have lists, no objects. So, a way is to make the "specific" launcher unique (type) and check for the type (example).

 

  • Like 1

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

×