Jump to content
Sign in to follow this  
Coronel_Niel

Ac-130 Firing Scipt Issue

Recommended Posts

Hi people, ive created a Ac-130 script which is nearly finished, just adding in something to make it more realistic and its finished, and optimise it.

This is just a beta, but I found a problem.

I dont want this script to execute onto a given spot, I want it to execute onto the person who walks into a trigger to activate it. It works if I give someone a name of Target1, and then put in his init line (or trigger act line)

[Target1, "25mm"] exec "Ac-130.sqs"

Target1 is where the focal point is, 25mm the cannon

This acts just fine, and him and anyone near him get smuthered in shots.

If I add in a trigger activated by blufor, on activation

[thislist, "25mm"] exec "Ac-130.sqs" and then run a guy into it (blufor, yes). No shots.

This isnt a script problem, i think its to-do with my trigger.

I've searched the forums, but no-one seems to have this issue and there's loads of stuff come back.

Any help? thanks

EDIT:

Added More Info

Edited by Coronel_Niel
added info

Share this post


Link to post
Share on other sites
[thislist, "25mm"] exec "Ac-130.sqs" and then run a guy into it (blufor, yes). No shots.

Use this:

{[_X, "25mm"] exec "ac-130.sqs"} forEach thisList

--

Should work..

And hey post your work sometime here, would be cool to try it out))

Share this post


Link to post
Share on other sites

thislist is an array of objects and not an object, so at some point you probably try to getPos from that parameter which is where your script probably fails as arrays don't have a position ;)

Depending on your script works, you may want to use the above suggestion (which will spawn it for each object that activates the trigger, but will not run the script for the 2nd unit that activated until it finished running it for the first).

Share this post


Link to post
Share on other sites

I know this is some-what random: but are you going to release this script (I Hope) :)

Share this post


Link to post
Share on other sites

yeah ill release it, and ill try this.

Yep, it tries to get the position of the target to fire on it, as firing on a predefined spot has untold amouts of problems.

At the moment, its just becoming optimised and adding in a feature that makes more shots hit closer to the focal point, rather than it being equally random, which is hard because exponential wont work.

But yeah, itll be released.

Worked perfectly, I only wanted it so its more usable in different missions rather than firing on one target, because if that targets dead, it'll shoot his body, or wont fire (didnt test).

Thanks

Edited by Coronel_Niel

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×