Forum Jump :

Author Message


Posts: 1
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name:

 
#1 Posted at 2017-09-09 13:33        
     
[Apologies in advance if this is not the correct place. I felt this question fit better here than in the other sections on mission editing]

So I'll admit before anything else that I'm new to Arma's community, bear that in mind. However I am fairly familiar with writing code, syntax, etc as I've been interested in C and C++ for a very long time. I have spent many hours attempting to solve the problem I am having here, and those hours have included looking at many examples from various forums on the subject in the community. At this point I don't know if I'm simply putting the information in the wrong place, or if the system doesn't work how I have come to understand it does.


For the purpose of solving this problem specifically I have set up a new scenario, just to keep things simple. I have two objectives, with a 3rd trigger that is set up (via script) to create a third objective once the first two are completed (in any order). I have confirmed that the creation script is working correctly, so the 3rd objective does create properly once it is triggered.


The problem appears to be with the Boolean variables I have set up in my init.sqf. The entirety of the document reads simply:

obj1 = false;
obj2 = false;

The purpose is simply to set up these variables so that I can modify them when an objective is completed successfully. The 3rd trigger condition is then set to fire, once both variables read true. The problem here is that this never happens.

What I am attempting to do is simply change obj1 and obj2 to equal true in the "On Activation" part of their respective triggers. Is this not how the system works?


Thank you in advance for any assistance you can lend, I would very much like to know what I'm doing wrong.


Author Message


Posts: 87
Rank:


Level: Member

Country: us
Location: Pennsylvania
Occupation:
Age:
In-game name: Xian

 
#2 Posted at 2017-09-12 04:03        
     
Try this:
your init.sqf
obj1 = false;
obj2 = false;

Objective 1's Trigger (ON ACTIVATION)
obj1 = true;

Objective 2's Trigger (ON ACTIVATION)
obj2 = true;

Your 3rd trigger (CONDITION)
(obj1) && (obj2)

that should fire off your 3rd objective script only after the first two are completed. Tested it out with a quick VR set up and it worked fine.


Advertisement


Author Message


Posts: 40
Rank:


Level: Member

Country: dk
Location:
Occupation: Trucker
Age:
In-game name:

 
#3 Posted at 2017-09-18 10:01        
     
hey try to take a look at this.

https://www.youtube.com/watch?v=Vm6yv9xxCUQ
Or this tread : http://www.armaholic.com/forums.php?m=posts&q=39171&n=last#bottom

It is better to burn out than fade away.