Jump to content
Sign in to follow this  

Recommended Posts

I'm getting really frustrated with this game. I thought the whole point of the 3d editor was to make it easier to do stuff IN THE EDITOR, and not have to fart around with scripts etc. However, I've resigned myself to having to do so, but there are few accurate and up to date tutorials around any more, and while the BIKI might be fine for developers and those who know this stuff, it's nigh on useless to me.

 

Can someone please help with what I'd have assumed would be a simple requirement. All I want to do is the following:

 

1) Create a starting task for all players.

2) Complete that task when all enemy in an area are dead.

3) Create a new task and assign to all players to go to a radio tower and blow it up

4) Complete that task when the tower is dead.

5) Create a new task and assign to all players to go to an airfield and destroy two aircraft.

6) Complete that task when the two planes are dead.

 

I don't want the tasks created in 3 and 5 to be visible until the prior tasks are completed, I don't want the players to have any indication of what is coming next. (this is one of my current problems with in-editor setup)

Of course I want this to be MP safe, JIP compatible and if you could explain in words of one syllable that would be marvellous... :) Thanks.

  • Like 1

Share this post


Link to post
Share on other sites

You can do that in editor or script, without any problem

Task module + task state(s) module + triggers linked on tasks (3 & 5) (to enable them). Trigger linked at task state module to make it completed. Same trigger (no enemy present in area of trigger) can change the first task state to completed and activate the following task. Simple as that.

Tower:

- if edited (placed on map by you), say a "Land_Communication_F", it's easy to add a small area trigger including the tower and link it by set trigger owner to the tower. Now, the activation is owner only, set it to not present. When tower is blown, the trigger acts.

- if map embedded. It's hard and useless to obtain the object id. Just find the tower class, the player pointing at it in preview and in a watch line of debug console write:  typeOf cursorTarget (try also: typeOf cursorObject)

Say "Land_TTowerBig_1_F" (like at Magos, North of Kavala - Altis), you don't need an area, trigger is none,none activation but write in condition field: !alive (nearestObject [getpos thistrigger,"Land_TTowerBig_1_F" ])

The trigger must be as close as possible of the antenna if similar objects close, and always within 50m  to detect something.

Share this post


Link to post
Share on other sites

Thanks. I have done all that already if you read the post. The issue with doing it that way is that the tasks aren't always syncronised between players, they're sometimes in the wrong order and most importantly they're all visible right from the start.

 

I believe I've found a way of doing it by script but need to test.

Share this post


Link to post
Share on other sites

Ok I seem to have found the solution I needed. missiontasks.sqf and judicious  use of isServer and BIS_fnc_misssiontasks. 

Share this post


Link to post
Share on other sites
On 04/06/2017 at 9:16 PM, charliereddog said:

Thanks. I have done all that already if you read the post. The issue with doing it that way is that the tasks aren't always syncronised between players, they're sometimes in the wrong order and most importantly they're all visible right from the start.

 

I believe I've found a way of doing it by script but need to test.

If there are all visible from the start, that means your triggers are activated (or not synced). I can guarantee you a create task module synced to a trigger, will depend on the state of the trigger to be visible. It's not my first time using tasks modules or task script for MP mission, even JIP.

Share this post


Link to post
Share on other sites

I'm not going to argue with you. I found a solution I'm happy with. It wasn't yours. It is all good. 

Share this post


Link to post
Share on other sites
5 hours ago, charliereddog said:

I'm not going to argue with you. I found a solution I'm happy with. It wasn't yours. It is all good. 

Not arguing, just proven facts and polite discussion.

Here is a forum, not a private mail. I can't let you say the tasks modules don't work with triggers. Some other people could think there is a problem where there isn't. Just some attention on triggers, syncs and task states.

 

You can also share your working script(s) as a good usage for this forum, especially when you're the author of the thread.

Share this post


Link to post
Share on other sites

Dude. I didn't say the triggers didn't work. I said the usage of them didn't fit my need which was to not have all tasks visible from the outset. You didn't provide a working example either.

Share this post


Link to post
Share on other sites

Been using triggers with modules for A3 for years and they always worked like a charm in SP and MP. Very recently though, the triggers linked to any modules don't work in MP for me anymore, not sure what I can be doing wrong. Mainly task modules don't tick complete in MP only in SP.

 

It's as if all triggers linked to modules all went local. It's strange, the moment someone joins modules stop working. Has anyone else seen this issue? You can test this with Enemy Contact 2.

Share this post


Link to post
Share on other sites
14 hours ago, charliereddog said:

Dude. I didn't say the triggers didn't work. I said the usage of them didn't fit my need which was to not have all tasks visible from the outset. You didn't provide a working example either.

 

No, I said I can't let you say that modules + triggers can't fit your basic need .. and even more.

It took me 5 minutes to create an SP /MP mission with triggers and tasks modules (up to tower is blown) to check them:

https://www.dropbox.com/sh/eiy1sw3zexvhhpr/AAAka8rjL78-S1zr4Q0P-hH_a?dl=0

The 2nd task never appears before the first is completed. Turn that in all ways you want, dude.

 

@ phantom There were some changes in triggers behaviors since 1.68 at least.

For example, before 1.68, if a trigger condition was let blank (no word at all), the trigger acted as always true, then fired at start.

Since 1.68, that doesn't work anymore, you need to write: true in cond. field to have the same result.
On the other hand, if some triggers can be impacted in previous 1.68 arma missions, there is no reason that impacts new mission with workable tested triggers.

As you can see in my mission.sqm, it's easy to use them with tasks and all parameters from editor for SP/MP (no description.ext). I didn't add respawn and revive or garbage collector and so on..., but many things can be done within mission.sqm scope (editor).

 

 

Share this post


Link to post
Share on other sites

And thank you. With that example I can finally see what I did wrong. (which was not syncing the task create modules to the previous task completion trigger).

Share this post


Link to post
Share on other sites

Ok I checked out the mission file, so far the only thing I haven't tried was the "server only" box. Maybe if I turn that on, all the objective triggers will work in MP now?

 

I tell you what's also strange my older missions still work fine in MP, just the new one doesn't. Uses the same exactly code as the older missions. Maybe when I spawned new triggers and modules from the latest update things became complicated. If that makes sense.

Share this post


Link to post
Share on other sites
2 hours ago, phantom3013 said:

Ok I checked out the mission file, so far the only thing I haven't tried was the "server only" box. Maybe if I turn that on, all the objective triggers will work in MP now?

 

No, the server only is useful to avoid duplication, with general condition like BLUFOR presence and aim like spawn units. For objective, the tasks have their own broadcasting in accordance with trigger's completion (server or not).

 

2 hours ago, phantom3013 said:

I tell you what's also strange my older missions still work fine in MP, just the new one doesn't. Uses the same exactly code as the older missions. Maybe when I spawned new triggers and modules from the latest update things became complicated. If that makes sense.

Can't help you so far without any detail. What do you mean by "spawning triggers and modules? edited or scripted?

Share this post


Link to post
Share on other sites

Best thing you can do to help me is open the file mission of Enemy Contact 2, take a look at the tasks modules and triggers connected to them. Maybe you can spot what I did wrong. Makes no sense it works in SP but not in MP, it's strange. But take a look at it, it's a 5 star mission you might like it.

 

http://steamcommunity.com/sharedfiles/filedetails/?id=917608054

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  

×