Flashy Posted October 22 Posted October 22 (edited) I have another little conundrum I am trying to solve: I want to create a template which can be imported into any single player mission generated by career mode or PWCG which will be able to detect where the player is in the mission and then do stuff based on that. The difficulty is that I dont want to have to create OL or TL to anything in the existing mission and my template. I also wont know what the players "name" will be in the mission, nor do I know what plane the player is flying. In the missions generated by career mode, a complex trigger is used to do this, but the mission logic knows the player name, so finding him in the generated missions is trivial (simply set object name to the player name in the complex trigger - done). I have a feeling there is no elegant way to solve this because there is no option in any of the checkzones or triggers etc to detect "player" - you can only detect named objects, certain types of vehicles/planes, or vehicles/planes of a certain coalition. But there are many people on here more intelligent than me, so I thought I would see if anyone has any ideas on how this could be done 🙂 Edited October 23 by Flashy
JG4_Deciman Posted October 31 Posted October 31 (edited) Hmmm With 'check zone' you are only able to select between plane and vehicles by coalition. So that will not work... The only way is 'complex trigger' and using the object name. I'm not sure if in the generated mission that is the 'players' name. But there should be only 1 object with AI setting 'player'. You just have to check if that object has allways the same name in any generated mission and in case it does... ...you must use 'complex triggers' detecting that named object, and in case of a very 'simple' function to generate the 'check zone' there will be no other way than to use and manipulate counters counting up and down due to any kind of entering (entering, spawning, ...) or leaving (despawned, left, killed, ...)that zone Deci PS: and in case you just need the ID of that plane (entity I guess) Open the mission wit a text editor and search for Ai = Player or so... Doing that by a script is also possible, but parsing the entire mission and changing content afterwards is very complex... I know that because I do that even to add content by hand (including complex logic) And the way until you have (almost) what you want is long, hard and frustrating because the smallest type mismatch kills it completely Edited October 31 by JG4_Deciman
Flashy Posted October 31 Author Posted October 31 Thanks @JG4_Deciman. That is pretty much the conclusion I came to as well - Il-2 cant differentiate between the player plane and an AI plane, it just knows coalitions, object types and the name of the object, and there doesnt seem to be a way to build logic that works when we dont know any of those things. I was also thinking about trying to detect things which would only be at the players aerodrome in a career or PWCG mission (like the windsock for eg - I think only the players aerodrome has a windsock), but I dont know how to make a complex trigger "detect" a windsock.. I dont think it can be done.. I guess I can use "On Took off report", but that assumes that the first flight to take off in a mission is always the player's flight. I am not sure how accurate and reliable that assumption is though..
JG4_Deciman Posted October 31 Posted October 31 You can send me 2 files. One containing tha 'generated' mission and one containing the 'template to be importet' I'll take some time and have a look at the basic text code... Maybe I finf a clue, maybe not Deci
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now