Home   Help Search Login Register  

Author Topic: Player option to continue or wait for nite, skiptime, addaction  (Read 1127 times)

0 Members and 1 Guest are viewing this topic.

Offline schuler

  • Contributing Member
  • **


About 15mins fter the mission starts the player gets a job to do. I would like to give him the option to make it a night job.

Player is civilian with an OPFOR soldier snyced with 0 presence.
 Mission starts at 1100am i would like to add the option to continue mission or wait til night,10 hours later at  900pm or so.

The trigger would be at his house where he goes to get weapons for the job.
What's the best way to go about this?  skipTime, , addaction?!?!?

Cheers in advance, schuler
Semper Fi

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Addaction is probably the best. :) Although really - addaction is such an archaic command, I really hope they revamp it for ArmA II (i.e., instead of unit addaction ["Name", "script.sqf"], it'd be unit addaction ["Name", {spawned script}]). But anyway, since the house is probably a "safe house", the best would be to have i.e. a trigger. Make it repeating if you want the player to be able to return there and skip time later, otherwise make it single shot:

Make it as large as the house, and group it with the Player -> Activated By: Vehicle Present

Condition: this
On Activation: WaitAction = Player addaction ["Wait 10 hours", "skiptime.sqf"];
On DeActivation: Player removeAction WaitAction; WaitAction = nil;

Then just make a little script called "skiptime.sqf";

Code: [Select]
titleText ["You take a rest for a couple of hours, until night falls...", "plain down"];
cutText ["", "black out", 1];
sleep 2;
skipTime 10;
sleep 1;
cutText ["", "black in", 1];

Something like that should do it? :)

Wolfrug out.


"When 900 years YOU reach, look as good you will not!"

Offline schuler

  • Contributing Member
  • **
thanks Wolfrug , That does the job for me just fine! I am just going to add somewhere in the briefing that he can sleep til dark at the house. Then have the trigger by the bed (the scenario is more archaic then the command  :-[ ).  but at least the mission can be played in a night version  ;)
cheers, schuler
Semper Fi