Jump to content

Recommended Posts

Posted (edited)

Hi all,

 

I am hoping someone can help me with toggle of the immortal state.

 

I fly in a group who are practicing formation flying in the Hawk. We have pilots of different skill levels, and suffer a lot of collisions, so we have set all our aircraft to immortal.

 

I have tried to add the following triggers to allow us to toggle this status during the flight;

 

Triggered actions to each craft

Immortal(on) "BK1 immortal"

Immortal(off) "BK1 mortal"

 

ONCE (Add radio items, NO EVENT)

TIME MORE (10)
FLAG OFF (2)

RADIO ITEM ADD (Blue, Blue knight god mode on, 2,2)

ONCE (Blue Knight God mode on, NO EVENT)

FLAG EQUALS (2,2)
RADIO ITEM REMOVE (Blue Knight god mode on)

RADIO ITEM ADD (Blue Knight god mode off, 2,1)

AI TASK PUSH(BK 01/1.Immortal(on) "BK1 immortal")

AI TASK PUSH(BK 02/1.Immortal(on) "BK2 immortal")

FLAG OFF (2)

ONCE (Blue Knight God mode off, NO EVENT)

FLAG EQUALS (2,1)
RADIO ITEM REMOVE (Blue Knight god mode off)

RADIO ITEM ADD (Blue Knight god mode on, 2,2)

AI TASK PUSH(BK 01/1.Immortal(off) "BK1 mortal")

AI TASK PUSH(BK 02/1.Immortal(off) "BK2 mortal")

FLAG OFF (2)

This doesn't seem to work though, and adds multiple "God mode on" commands. I guess it has some thing to do with trying to set a trigger to 2, I don't not if a flag is a Boolean, but if I use as a Boolean then each time I set it's state to either 1 or 0 the event causes the trigger action to swap states without user prompt, hence using FLAG state 2, and clearing FLAG to 0 after each command, I guess like a case statement.

 

I have a good crop of hair still, but with all this scratching my head....

Edited by DoctorStrop

Windows 10 64bit, Intel i7 6700K, 32GB Corsair 2400Mhz, 970 NVMe 500Gb SSD, GeForce 2080 super, HP Reverb, VKB GF PRO, Thrustmaster Warthog throttle, Thrustmaster Pendular rudders, Windows + DCS :thumbup:

 

My youtube channel

Posted (edited)

If the trigger mode god On off is in ONCE that wont work, need to be switched condition.

If it doesnt work ,

 

try at the beggining set a trigger saying that everyone is mode god off.

 

oNce- time more 2 - AI push task inmortal off

Edited by ESAc_matador
Posted
If the trigger mode god On off is in ONCE that wont work, need to be switched condition.

If it doesnt work ,

 

try at the beggining set a trigger saying that everyone is mode god off.

 

oNce- time more 2 - AI push task inmortal off

 

Hi,

 

Maybe I do not understand your answer. I set to switched condition, and it still does not work as expected. I get the radio option toggling as desired, but the aircraft still gets destroyed.

 

I am guessing the state of an aircraft cannot be set if it is not spawned, and I would need a way of testing if the aircraft exists then change trigger state and also when spawning check the state of the FLAG to see if it should spawn in immortal or mortal state.

 

I have changed to the following, but guess more working out to be done;

 

ONCE (Add radio items, NO EVENT)

TIME MORE (10)
FLAG OFF (1)

RADIO ITEM ADD (Blue, Blue knight god mode on, 1,1)

SWITCHED CONDITION (Blue Knight God mode on, NO EVENT)

FLAG EQUALS (1,1)
RADIO ITEM REMOVE (Blue Knight god mode on)

RADIO ITEM ADD (Blue Knight god mode off, 1,0)

AI TASK PUSH(BK 01/1.Immortal(on) "BK1 immortal")

AI TASK PUSH(BK 02/1.Immortal(on) "BK2 immortal")

 

SWITCHED CONDITION (Blue Knight God mode off, NO EVENT)

FLAG EQUALS (1,0)
RADIO ITEM REMOVE (Blue Knight god mode off)

RADIO ITEM ADD (Blue Knight god mode on, 1,1)

AI TASK PUSH(BK 01/1.Immortal(off) "BK1 mortal")

AI TASK PUSH(BK 02/1.Immortal(off) "BK2 mortal")

Windows 10 64bit, Intel i7 6700K, 32GB Corsair 2400Mhz, 970 NVMe 500Gb SSD, GeForce 2080 super, HP Reverb, VKB GF PRO, Thrustmaster Warthog throttle, Thrustmaster Pendular rudders, Windows + DCS :thumbup:

 

My youtube channel

Posted

Yes, it should work.

 

Perhaps instead of doing "time more" just use "Mission Start" and add the radio commands then, also the Flag 1 off is not necessary.

 

Also, it would be easier if you just added all the clients as members of one group, that way you can toggle immortality on and off with just one command.

 

for the on and off, I would recommend not to use flag values, but different flags. So in your example:

 

MISSION START (Add radio items, NO EVENT)

(condition empty)

RADIO ITEM ADD (Blue, Blue knight god mode on, 1,1)

 

SWITCHED CONDITION (Blue Knight God mode on, NO EVENT)

FLAG EQUALS (1,1)

RADIO ITEM REMOVE (Blue Knight god mode on)

RADIO ITEM ADD (Blue Knight god mode off, 2,0)

AI TASK PUSH(BK 01/1.Immortal(on) "BK1 immortal")

AI TASK PUSH(BK 02/1.Immortal(on) "BK2 immortal")

FLAG OFF (1)

 

SWITCHED CONDITION (Blue Knight God mode off, NO EVENT)

FLAG EQUALS (2,0)

RADIO ITEM REMOVE (Blue Knight god mode off)

RADIO ITEM ADD (Blue Knight god mode on, 1,1)

AI TASK PUSH(BK 01/1.Immortal(off) "BK1 mortal")

AI TASK PUSH(BK 02/1.Immortal(off) "BK2 mortal")

 

Hope this helps!

For more information, please visit my website. If you want to reach me with a bug report, feedback or a question, it is best to do this via my Discord channel.
Details about the WinWing draw can be found here. Also, please consider following my channel on Facebook.

Posted

Thanks for your reply. This I also tried. I still doesn't work as expected. :(

Windows 10 64bit, Intel i7 6700K, 32GB Corsair 2400Mhz, 970 NVMe 500Gb SSD, GeForce 2080 super, HP Reverb, VKB GF PRO, Thrustmaster Warthog throttle, Thrustmaster Pendular rudders, Windows + DCS :thumbup:

 

My youtube channel

  • Recently Browsing   0 members

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