Jump to content

Man down...


ENO

Recommended Posts

  • ED Team
this would be a problem, if you call the group via script (addGroup) the group name will not show up in the ME GUI!

 

You would probably need to set a script for deactivating instead of using the built in stuff in ME, would be my guess....

64Sig.png
Forum RulesMy YouTube • My Discord - NineLine#0440• **How to Report a Bug**

1146563203_makefg(6).png.82dab0a01be3a361522f3fff75916ba4.png  80141746_makefg(1).png.6fa028f2fe35222644e87c786da1fabb.png  28661714_makefg(2).png.b3816386a8f83b0cceab6cb43ae2477e.png  389390805_makefg(3).png.bca83a238dd2aaf235ea3ce2873b55bc.png  216757889_makefg(4).png.35cb826069cdae5c1a164a94deaff377.png  1359338181_makefg(5).png.e6135dea01fa097e5d841ee5fb3c2dc5.png

Link to comment
Share on other sites

  • ED Team
yes, i need removeGroup command in SSE

 

This may be crazy talk, but could you set up a generic mission with a deactivate trigger. Then open that mission in notpad+ and get the code from that for the trigger and set up your own script? Then you could set the group name to whatever you named your spawning group... or maybe I am just talking out of my ass :)

64Sig.png
Forum RulesMy YouTube • My Discord - NineLine#0440• **How to Report a Bug**

1146563203_makefg(6).png.82dab0a01be3a361522f3fff75916ba4.png  80141746_makefg(1).png.6fa028f2fe35222644e87c786da1fabb.png  28661714_makefg(2).png.b3816386a8f83b0cceab6cb43ae2477e.png  389390805_makefg(3).png.bca83a238dd2aaf235ea3ce2873b55bc.png  216757889_makefg(4).png.35cb826069cdae5c1a164a94deaff377.png  1359338181_makefg(5).png.e6135dea01fa097e5d841ee5fb3c2dc5.png

Link to comment
Share on other sites

I tried something.

You can add a group in the Mission editor map (in a place that it does not affect the mission) and name it with the same name as the newly created group by the script.

 

 

Then you can add flags etc, to that group (you will see it in the ME GUI) and when you run the mission and the script will be active the old group will be destroyed and only the new one will be left :) The flags work now for the new one!

"ARGO" DCS UH-1H DLC SP Campaign

373vFS DCS World squadron (Greece) - www.buddyspike.net

"ARGO 2.0 Project Phoenix" UH-1H DLC Campaign - WIP

Link to comment
Share on other sites

Just deactivate that group with a trigger condition based on a flag set when your rescue unit has been in a particular zone nearby. Speed less than 1 and altitude less than 10 perhaps as well? You could go "time since flag" for a certain time to allow for the "pickup" as well.

 

 

hiya,

 

i was trying something similiar before i found this topic.

 

in my mission, players fly around, once they come into a trigger zone around the downed pilot, he will pop smoke. (zone diameter simulating how far the downed pilot can "see" and identify allied rescue troops).

 

so far so good, landing at the downed pilots place, picking him up and RTB to base works as well, more or less....

 

i used the "altitude less then" condition, but it does not feel right, as a real landing is not needed. the infantry man i'm using as pilot will just be deactivated and gets invisible that way.

 

the mission is working, but it's not feeling right when you know what is happening.

 

so i felt i may ask my question in this thread: is there anything like "has landed in zone" or something except the altitude/speed workaround?

 

btw eno, i'd like to test your mission once it's done :)

 

regards,

RR

[sIGPIC][/sIGPIC]

"There's nothing to be gained by second guessing yourself.

You can't remake the past, so look ahead... or risk being left behind."

 

Noli Timere Messorem

"No matter how fast light travels, it finds the darkness has always been there first, and is waiting for it."

Terry Pratchett

Link to comment
Share on other sites

  • ED Team
Eh Joy... I tried out your script in my mission to test it out and it didn't do anything. I'm pretty new at it as well... what is it "supposed" to do? If I need to set a flag with it then I can do that- but in looking at it I'm not seeing how I can broadcast.

 

Some insight would be nice!

 

Thanks,

 

I am new to the scripting myself so if this response comes off insultingly rude please forgive me, but did you replace the "customEventHandler" with some sort of... err... custom event... uh handler :)

64Sig.png
Forum RulesMy YouTube • My Discord - NineLine#0440• **How to Report a Bug**

1146563203_makefg(6).png.82dab0a01be3a361522f3fff75916ba4.png  80141746_makefg(1).png.6fa028f2fe35222644e87c786da1fabb.png  28661714_makefg(2).png.b3816386a8f83b0cceab6cb43ae2477e.png  389390805_makefg(3).png.bca83a238dd2aaf235ea3ce2873b55bc.png  216757889_makefg(4).png.35cb826069cdae5c1a164a94deaff377.png  1359338181_makefg(5).png.e6135dea01fa097e5d841ee5fb3c2dc5.png

Link to comment
Share on other sites

I am new to the scripting myself so if this response comes off insultingly rude please forgive me, but did you replace the "customEventHandler" with some sort of... err... custom event... uh handler :)

 

Thats the function name, no need to change it. I'll try it out later to see what is happening.

 

 

Deactivating a group via script is very easy...

Group.getByName('groupNameHere'):destroy()

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

Eh Joy... I tried out your script in my mission to test it out and it didn't do anything. I'm pretty new at it as well... what is it "supposed" to do? If I need to set a flag with it then I can do that- but in looking at it I'm not seeing how I can broadcast.

 

Some insight would be nice!

 

Thanks,

 

I had to run to BAntDit for more help. Learning this as I go as well. There just needed to be an additional line added at the end of the script to load the eventHandler in the event table.

 

world.addEventHandler(customEventHandler);

 

Many thanks to BAntDit. Here's what he put together:

 

 

customEventHandler = {};

 

function customEventHandler:onEvent(event)

if (world.event.S_EVENT_EJECTION == event.id) then

local _location = event.initiator:getPoint();

local _time = timer.getTime();

 

local _latitude, _longtitude, _ = coord.LOtoLL(_location);

 

trigger.action.outText('Pilot ejected at point: latitude: ' .. string.format("%.3f", _latitude) .. ', longitude: ' .. string.format("%.3f", _longtitude), 10);

 

end

end;

 

world.addEventHandler(customEventHandler);

 

  • Like 1
Link to comment
Share on other sites

Eh Joyride thanks for following up on this.

 

While I'm thinking about things- here's a question: How do we tie that into a zone of a certain diameter in which a soldier / pilot can randomly appear?

 

I'm still reading about how to properly deploy units inside zones randomly as well... I need to learn how to apply square shaped zones so that I don't need overlap nor have gaps in coverage of a certain area.

 

What I have so far are 3 different aircraft per side that meet in the middle and duke it out... when one wins, it leaves and lands (so that it doesn't interfere with the rescue effort.) A variety of aircraft are available for rescue including A-10s, SU25s, KA50s and UH1s. Both sides also have similarly structured ground vehicles to attempt capture / protection.

 

My biggest challenge now isn't so much identifying the area of the ejection as much as just putting the guy on the ground in a spot relative to where that ejection happened. The spot the ejection happens still gets people in the ballpark- but I'd like to deploy a "unit in moving zone" type situation where a zone is formed a certain diameter around that point, and have the unit spawn inside that zone.

 

Possible or am I dreaming?

"ENO"

Type in anger and you will make the greatest post you will ever regret.

 

"Sweetest's" Military Aviation Art

Link to comment
Share on other sites

I had to run to BAntDit for more help. Learning this as I go as well. There just needed to be an additional line added at the end of the script to load the eventHandler in the event table.

 

world.addEventHandler(customEventHandler);

 

Many thanks to BAntDit. Here's what he put together:

 

 

customEventHandler = {};

 

function customEventHandler:onEvent(event)

if (world.event.S_EVENT_EJECTION == event.id) then

local _location = event.initiator:getPoint();

local _time = timer.getTime();

 

local _latitude, _longtitude, _ = coord.LOtoLL(_location);

 

trigger.action.outText('Pilot ejected at point: latitude: ' .. string.format("%.3f", _latitude) .. ', longitude: ' .. string.format("%.3f", _longtitude), 10);

 

end

end;

 

world.addEventHandler(customEventHandler);

 

Thanks for that find man, I'm new to scripting so kinda have no Idea about this. Can I use this script in ME directly or is it a separate LUA? Better still, can u explain how I would use this?

Thanks

Midnite Signature.jpg

552334314_MidniteSignature.jpg.7c1678ea5639bd6d044b092eb97c300e.jpg

Link to comment
Share on other sites

Midnight - that works if you just set up a Mission Start > DO SCRIPT with the text cut/paste in the script window.

 

ENO, you and I are definitely heading the same direction, but I still have a big gap to cross. Not sure about setting up the zones...I am going to try to only set up a single poly zone, "enemy territory", out of which a CSAR scenario would not be generated. What I am trying to do now is instead of generating the text message with the coordinates of the pilot (instantly), I want to spawn a solider within some logical proximity of the eject coordinates. That way I know have a "marker"on the map for which to now organize everything else that will happen in the mission (where to pop smoke, broadcast of the pilots beacon, delayed radio messages, where to send SAR helos, where the enemy will start to move towards, etc etc). Doing it that way as I don't understand how I can "store" or "transfer" the eject coordinates to subsequent scripts or triggers within the mission.

Link to comment
Share on other sites

That would be awesome. I think I will read through the MIST guide to figure ut how to make that. If it works I will implement that into my "mission framework", so every mission contains dynamic generated CSAR and RESCAP taskings.. And now with the Huy you can even fly the Rescue mission yourself :)

If you figure out how to get this running, please share it here :)

"Sieh nur, wie majestätisch du durch die Luft segelst. Wie ein Adler. Ein fetter Adler."

http://www.space-view.net

Link to comment
Share on other sites

Okay, on a positive side I've utilized this new code and been able to get the response I needed. The ejection point is broadcast now for about 10 seconds or so. I assume I could post that a bit longer by editing the following line:

 

trigger.action.outText('Pilot ejected at point: latitude: ' .. string.format("%.3f", _latitude) .. ', longitude: ' .. string.format("%.3f", _longtitude), 10);

 

 

The 10 looks like the reference I need to change to a time of my choosing.

 

Okay then... now to figure out a way to pull that data into the "spawn point..."

"ENO"

Type in anger and you will make the greatest post you will ever regret.

 

"Sweetest's" Military Aviation Art

Link to comment
Share on other sites

Thanks Joyride. Sorry for the multiple threads on the issue but no matter how hard I try I get bogged down in some of the new "script" abilities. Sometimes what they're called and what they can do when combined with other abilities aren't always related so I just melted down and started from scratch.

"ENO"

Type in anger and you will make the greatest post you will ever regret.

 

"Sweetest's" Military Aviation Art

Link to comment
Share on other sites

Alright, got a very simplified dynamic Search and Rescue (SAR) scenario working.

 

.miz attached.

 

Here's how it goes:

 

1. Pilot (client) ejected. Be ready to CTL-EEE as you are about to hit a hill at mission start ;-) The ejection location/coordinates are stored with scripting.

 

2. After 10 seconds, a solider spawns to replicate the pilot.

 

3. After 20 seconds, the callsign of the unit that ejected is called with coordinates of the ejection ("last known location" sort of thing).

 

4. A SAR helo on the ramp is replaced with a spawned helo (identical info) that has the ejection location as a waypoint to orbit.

 

5. When pilot gets LOS, he calls it, and should pop smoke. For now, I took the smoke script out cuz for the life of me can't get trigger.smoke.color and trigger.action.smoke working...any help is appreciated. Busted script for the smoke in spoiler...

 

trigger.smokeColor = {

Green},

 

local alt = land.getHeight(_ejectloc),

local pos3 = {x =_ejectloc.x, y =alt, z =_ejectloc.z},

trigger.action.smoke(pos3, SmokeColor);

 

 

6. After the helo has been hovering the near the pilot, the pilot walks to the coordinates of where the helicopter actually hovers, as it never orbits directly above the point it's supposed to.

 

7. RTB and deactivation of the pilot.

 

I would love to do #6 and #7 above with moving zone based triggers/logic, but as I mentioned above cannot get the moving zones to function either attached to or trying to detect within any dynamically spawned unit. Also, the ME speed trigger conditions (to set a flag true after the helicopter is hovering for some period) didn't work for the dynamically spawned helo.

 

Would also love to be able to detect the chute and set the location based on the actual pilot, but not sure we can get the location of such object in current version. In future versions, I would like to also have coordinates stored if the client leaves the unit (ie: goes to spectator in MP). That's easy to do as it's in the eventHandler.

 

There is a lot I plan to do to emulate CSAR ops, such as proper 2-ship SAR helo ops, beacons/ADF from PRC-112 and/or relay from AWACS for CSEL, proper calls and timing of events, etc. etc. All the fun stuff.

 

Will also eventually add the terrain detection to adjust if over water.

 

Any help on streamlining this .miz/scripts would be greatly appreciated as I am a scripting novice.

Dynamic SAR Test.miz


Edited by Joyride
Link to comment
Share on other sites

Be cool, maybe TOO hardcore for some, but if you could make it so the player that ejected couldnt respawn into a new plane until he was returned to base :)

 

Respawning and rescuing yourself could be weird, but a proper CSAR miz could take hours!

Link to comment
Share on other sites

Yeah, I was talking MP, too. Some people might want to hang out and use Guard to coordinate the rescue. If the downed pilot could be detectable, had a binocs view, and access to the F10 menu to trigger flares and such, it'd be interesting to hang around for a while after punching out for sure. In that case, I don't want the "solider" to spawn, only when the bail out of the client spot. Easy enough to handle with scripts.

Link to comment
Share on other sites

Hey Joyride. I have been working on something similar. Do you have a unit transmitting an ADF tune-able signal yet?

Fridge

----------

Things which do you no good in aviation:

1) Altitude above you;

2) Runway behind you;

3) Fuel in the truck;

4) The airspeed you don't have.

Link to comment
Share on other sites

I've been setting my scenario up for A-10 CSAR and the A-10 in the sim can't ADF like the Huey and KA-50, so no. My ultimate plan is to have the unit transmit calls on guard but will simulate the position coming from a CSEL transmitter (so comm sat GPS coordinates related from AWACS) vs. ADF. Wish it could work though for the A-10...would be cool.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...