Jump to content

Recommended Posts

Posted

Hi,

 

I'm having some issues with the addgroup script, it seems that sometimes it works and sometimes it doesn't :huh:

 

The trigger is simple -

Switched condition - Group dead - Do script, activate group.

 

 

After the F-15 is destroyed it should be respawning at the Miner...Vody, in Runway position, it sometimes work and sometimes doesn't, I've tried to experiment with the other takeoff options such as ramp and hot, both don't work - no spawn at all.

Another issue is that if i destroy the F-15 The trigger will sometimes start before I get the kill message and the score.

 

http://pastebin.com/LKAdHgBB

 

Is there a way to change the trigger to fix these issues?

 

 

2nd thing, I want to add an option to spawn an airplane using the radio menu, I'm trying to impliment the AddCommandForGroup option but I need some help, here is the script (this is the first attempt to make somthing, pretty sure i messed it up :doh:) -

 

http://pastebin.com/USZNX9qj

 

Thanks for any help!

Posted

Triggers relevant to unit or groups conditions do not seem to work with dynamically spawned groups. So the group dead condition probably won't work. However you should be able to use the lua expression condition to achieve the same overall thing:

 

if not Group.getByName("AI - F-15C") then
return true
end

 

Switched Condition>Expression>Do Script

 

 

I honestly haven't messed with the addCommandForGroup lua actions, so I can't really help you there. However you could do a hybrid with triggers and scripting to achieve the same sort of thing. For instance using the triggers to add a F10 option to group to set a flag to spawn a specific aircraft.

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

Posted

TeTeT, I haven't really starting to do anything with the MIST functions, I prefer to start from the basic scripts and later on after understanding the basics, use the MIST functions.

 

Grimes, Thanks for this solution, I'll try to implement it, will this expression wait until the unit is destroyed completely and allow the message to be shown and score to be added?

If not, is there a way to put a 60 sec delay in the script itself?

 

Regarding the addCommandGroup, I didn't know that using the triggers to achieve this was a possibility, I still would have to use some script as the generate function I want to add has a groupid counter that means any number of planes can be added to the mission by re selecting the option, gonna do some test if it's possible.

  • Recently Browsing   0 members

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