-
Script Question
I Have a big scale mission set up that starts with only 3 task/objectives. They are to man the OP's 1,2,&3. After thay as per the brief you pull security. 5-7mins later there is an all out assault by our little russian friends.
My question is this
How do I update the objectives once the assault starts? I need something to pop up and say "Hey they are attacking hold the line, yadda yadda"
The catch is. I dont want the players to be able to see that task in the brief....Can anyone help me with this? Would it have to be like a side task like in our Domi missions?|TGU Instructor|303rd TGSAD|ArmA Admin||TG Pathfinder|
DO YOU HAVE WHAT IT TAKES?

Armis Exposcere Pacem
-
Re: Script Question
It depends how you want to do it. If you played any of my missions, there is a pop up coming out with informations.
Create trigger and in On activation put:
Code:HintC "Reds are attacking, hold the line, then move to the town. Bla, bla bla".
OR
http://www.armaholic.com/page.php?id=7377.
You can use taskmaster, which will add tasks during the mission. However, we don't have always time to open map, look on briefing during gameplay, etc... So, I advice to use the first option.
-
Re: Script Question
The same createSimpleTask-stuff that you have in the briefing.sqf can be added anywhere in a mission. Just put the needed code into a trigger or script run when you want to add the new tasks and/or remove the old ones.





-
Re: Script Question
so what i can do is place an area trigger and have OPFOR present to activate it right where the assault begins and basically the script will be something like this
On Act
player createSimpleTask ["Hold The Line"];
setSimpleTaskDescription ["The Russians Are Attacking!", "HOLD!", "Hold Here"];Hint "The Russians Are Attacking Us";
look abouts right?|TGU Instructor|303rd TGSAD|ArmA Admin||TG Pathfinder|
DO YOU HAVE WHAT IT TAKES?

Armis Exposcere Pacem
-
Re: Script Question
Yep. That looks to me like it should work perfectly.
If you want to you can start by changing the old objectives to cancelled, and automatically set the 'Hold the line'-task to the current one.





-
Re: Script Question
the other objectives are updated and "crossed" off the list as soon as players enter the bunker OP's so thats not really an issue.
im just going to make a small trigger radius where the enemy walksthough,should be able to see them by then, and have the task update.|TGU Instructor|303rd TGSAD|ArmA Admin||TG Pathfinder|
DO YOU HAVE WHAT IT TAKES?

Armis Exposcere Pacem
-
Re: Script Question
Yes, but if you do it this way, then JIP and respawn will not see updated tasks.
Taskmaster, has everything you need with JIP/respawn synchronization.
-
Re: Script Question
I thought they had fixed that so that triggers automatically sync with the server when a new player joins?





-
Re: Script Question
can we get clarification on that? is there away to check? without actually running the mission
|TGU Instructor|303rd TGSAD|ArmA Admin||TG Pathfinder|
DO YOU HAVE WHAT IT TAKES?

Armis Exposcere Pacem
-
Re: Script Question
Investigating this atm. Hope to have a definite answer soon. There are alternative solutions with publicVariable, but I guess not having that would be nicer





-
Re: Script Question
Okido! Tested and done, and thanks to GeneralCarver and Gr!mReeper for being test subjects.
Triggers do NOT sync on JIP, so to get around this you'll have to use for example the publicVariable command.
In this mission's case, on the OPFOR Present trigger, just set its On Activation to east_present = true; publicVariable "east_present". Then have another trigger with east_present as its one and only condition in the condition field, and make that trigger update peoples' briefing.
Alternatively force-run a script that processes the state of certain variables of your choosing, possibly through waitUntil, or through if-checks within a loop (with a sleep duration of a few seconds this is MUCH nicer on the computer than a trigger is. This is true in general for servers as well.)




-
-
Re: Script Question
Well, if looking at it at a lower level a trigger checking once every 0.5 seconds is essentially in a sleep 0.5; pause, making neither more effective than the other. The bonus with scripts is that you can make five or ten second pauses, or even longer, before checking against the condition.
For missions that aren't any resource-hogs I guess it doesn't matter which one chooses. With lots of AI and stuff one has to become more resource-concious. ^^




-
Re: Script Question
No need to be afraid of this really. 120 FSMs each checking two to four conditions every frame resulted in no noticeable performance hit whatsoever, and I doubt you'll ever use that many in a real mission. There's stuff like AI that'll eat resources much quicker than any sleeps or condition checks you need in the mission.
edit: From the FSM thread
So I lied, we lost about 0.21 frames over 60 secondsCode:FSM running for 120 AI and one player Average fps over 60 seconds 36.9902 No FSM(stock Arma2) Average fps over 60 seconds 37.2029 FPS measured using diag_frameno and diag_ticktime
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)





Reply With Quote


Bookmarks