![]() |
Send message on grouped active triggers
Hi,
I am looking to have a message sent every few minutes that will send a message saying if the Objective is complete or not. Currently if the 3 Bool Triggers are activated as a group then the objective is complete. Is there a way in Ticktime to check that these are active or not and send a message to the Hud that the Objective is "Complete" or "Not Complete" Code:
bool BGTarget2 = false; //German Bomber group 1 of 6 Code:
|
I don't think you can set the ticktimer with the 18 == 17 followed by the ontrigger as the ontrigger is an internal event based reaction, polling with a timer you will miss the event.
you are relying on a time based system to look for change, where really you may want a event based system or both. I would excecute a separate private void to test for your true and false conditons with the timer. Then have the ontrigger as standard setup waiting for the events to set up the true and false condition, destroyed etc what ever the trigger type. You could also execute the private void test upon true false setting at the ontrigger. Actually note in the other thread about point2D where I setup true and false test in the ontrigger, but call a private void which in this case can be called by 3 event types. Timer, ontrigger and onplaceenter I would also test the triggers themselves separately, each sets an individual true or false, then test the those true and falses, rather than try and group the triggers . Also place a test message (that you text out later) in each trigger and stage, so you know where your code is getting up too. |
I had a think about it. I do have the BOOL's for each trigger to check.
You think this would work? I am checking each Bool that they are True. Then reseting htem to False if they are true and sending out the messges. I have OnTrigger set and that works fine. I am hoping the code below will give me the update every 10 mins that the objective is complete IF the BOOL's are True. Code:
public class Mission : AMission |
Should work ;)
Btw. You use bools so its not nessesary to write: if ((BGTarget2 == true) && (BGTarget2_1 == true) && (BGTarget2_2 == true)) you could also use: if (BGTarget2 && BGTarget2_1 && BGTarget2_2) |
I am such a bool!
Cheers Kodiak Seems to run through MS Visual Express with out errors also. Thanks |
Question if anyone can help. I am using MS Visula express c#
When I click 'Start Debugging' It runs but I get an error warning 'A Project with an Output Type of Class Library cannot be started directly. In order to debug this, add an executable project to this solution which references the library project. Set the executable project as the Startup Project." I am not sure how to do this. I gather it wants the Launcher.exe which I have, but unsure how to adde it. If it is to hard to explain the steps don't waist your time. I can get by. Thanks :D |
You create a DLL a DLL must be called by a programm to work. A DLL is never standalone.
BTW the debugger is worthless in this situation, you cannot run it in Cliffs of Dover. :( |
Quote:
|
Btw a other aproach to the problem, with counters:
Code:
using System; |
hummm i like it. I will have a look later and see if I can use it that way.
looks cleaner, but I have many triggers and see if it will work. Thanks |
All times are GMT. The time now is 06:09 AM. |
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.