Hard Light Productions Forums
Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: ReeNoiP on April 26, 2010, 03:14:38 pm
-
I'm trying to make it so that the player must use a specific primary weapon to destroy some cargo containers. Is it possible to somehow check which weapon was used for the kill? If it means anything, the weapon will always be in bank 1.
The idea is that the cargo contains bombs which will detonate if normal weapons are used. My first idea was to disable them first using distruptors, but it seems you can't disable cargo containers. I don't want to lock the primaries to that specific weapon if I can avoid it, since there are enemies in the area.
Also, I want to have the player able to order his wingmen around (including attack my target), but unable to order them to attack the cargo. I tried adding a ai-ignore goal with priority 90 (should override player orders correct?) but it doesn't work.
-
I'm trying to make it so that the player must use a specific primary weapon to destroy some cargo containers. Is it possible to somehow check which weapon was used for the kill? If it means anything, the weapon will always be in bank 1.
The idea is that the cargo contains bombs which will detonate if normal weapons are used. My first idea was to disable them first using distruptors, but it seems you can't disable cargo containers. I don't want to lock the primaries to that specific weapon if I can avoid it, since there are enemies in the area.
tricky one... have you checked under the "training" section of the sexps? I recall seeing some sexps that checked if the primaries or secondaries where triggered, though I don't know if those can tell the difference between primary banks.
If they can you can check if the player used the NOT allowed bank, but I guess you can't check directly if it was in fact used to destroy the cargo container.
Also, I want to have the player able to order his wingmen around (including attack my target), but unable to order them to attack the cargo. I tried adding a ai-ignore goal with priority 90 (should override player orders correct?) but it doesn't work.
Did you add that to all wings?... it should work.
-
For the second part try above 100.
For the first nothing I can think of but it should be possible to work around. A little more info would be useful. When are the containers allowed to be destroyed? Anytime? After scanning?
You could always modify the cargo to have an engine then it probably can be disrupted. Never tried it.
-
Make sure the weapon does no actual damage but actually affects simulated hull instead. Use hits-left-subsystem (or whatever Goober replaced it with) checking the simulated hull damage. Then if the cargo gets damaged by anything else (or use the damage-caused SEXP for Alpha 1) you can do whatever you want with it.
FUBAR is right about using something over 100. Player orders are somewhere between 100 and 91 depending on exactly how they are given.
-
For the wingmen, would protect-ship on all the cargo pods work? (just wondering, an ignore-ship-new would work depending on the number of cargo containers- too many and it might get cumbersome.)
For the bomb thing, modifying the pof and adding a subsystem just seems easier to me. Never used simulated hull so I can't make any suggestions in that regard.
-
Modifying the pof is a rather ****ty way of doing things if you're talking about a retail model. If the pof is ever updated for the media VPs your players will never see it.
-
For the wingmen, would protect-ship on all the cargo pods work? (just wondering, an ignore-ship-new would work depending on the number of cargo containers- too many and it might get cumbersome.)
I'm when-argument-every of, so it's not that bad. Seems to be working with higher priority, but adding protect should help ensure it even better.
For the bomb thing, modifying the pof and adding a subsystem just seems easier to me. Never used simulated hull so I can't make any suggestions in that regard.
I'd rather focus on FREDding than modding, and I have no idea how to work with pofs. So I think a little table editing and checking simulated hull is a better solution for me.