Jump to content
Sign in to follow this  
Antonoo

Pickup Map - Get new objective.

Recommended Posts

Hello.

Ive searched around I got the answer to do this, but it requires scripting and what I need is to add an objective when the item is picked up. The answer I found only makes the current objective completed.

I do not have the logic or experience to do this so I wondered if you guys know how to do this?

Share this post


Link to post
Share on other sites

mmm i would do that :

Create a Trigger name trg1 :

cond : time > 1

act : tskExample1 = player createSimpleTask ["Pick the item"];

tskExample1 setSimpleTaskDescription ["Pick the item from you house", "Pick the item from you house", "Pick the item from you house"];

tskExample1 setSimpleTaskDestination (getMarkerPos "item1"); //Make sure you have an empty marker called 'item1',

player setCurrentTask tskExample1;

then on item init. put :

this addaction ["Pick the item", "item.sqf"];

then do create item.sqf and put that in :

nameofitem setpos getpos whatyouwant;

tskExample1 setTaskState "SUCCEEDED";

hint "You picked the item"

hope it help will post 1 mission exemple in few minutes.

http://rapidshare.com/files/455294052/exemple.Chernarus.rar Exemple Mission

Edited by Ios
PS :

Share this post


Link to post
Share on other sites

He already said he knows how to set it succeeded. :P

Besides, that will only work in SP.

Share this post


Link to post
Share on other sites

once you pick up the item (deletevehicle suitcase or whatever)

another trigger

cond: !alive Item

act: obj2 = player createsimpletask ["go over there man"]; blah blah blah

Share this post


Link to post
Share on other sites

Guys.. Youre confusing me lol. So what Ios said wont work in MP, this is supposed to be a MP COOP mission so ill rule that thing out. However thanks for learning me on some more scripting.

Okey so how do I get this to work in MP. Pickup item-Item dissapear-Mission completed-Mission Added.

Share this post


Link to post
Share on other sites

Item init field:

this addaction ["Pick up","pickup.sqf"];

pickup.sqf

ItemPickedup = true;
publicvariable "ItemPickedup";

Trigger:

condition: ItemPickedup

onAct: nul = [] execvm "script.sqf";

script.sqf:

deletevehicle itemName;
task1 settaskstate "succeeded";
task2 = player createsimpletask ["task2"];
task2 setsimpletaskdesction ["bla","bla","bla"];

Share this post


Link to post
Share on other sites

Thanks braw for the fast answer thank you alot! If I return I will do so with issues in this thread. Otherwise it works! THANKS EVERYONE :)

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  

×