OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting Resources Beta Testing & Submission => Topic started by: Fincuan on 06 Nov 2009, 21:05:11

Title: Disposable AT weapons - The FSM way
Post by: Fincuan on 06 Nov 2009, 21:05:11
Yeah I know, there's a gazzillion scripts for disposable AT weps  :D

Here's another one, this time using FSMs. I did it mainly to practice using FSMs, but it turned out to work surprisingly well. I wasn't able to "break it" in my tests, so can any you guys help me? Especially MP functionality is a mystery. I didn't figure of any reasons why it shouldn't work in MP as such, but I just wasn't able to test it at the moment. SP works fine. I was afraid it'd be pretty heavy on the system, but even in the sample mission I noticed no performance hit at all with 120 AI running it at the same time.

Sample mission with the system(Please do not mirror yet, early early testing going on):

edit: New version uploaded. Now MP and respawn compatible for players, but will quite if it's AI that dies.
Title: Re: Disposable AT weapons - The FSM way
Post by: Rommel92 on 06 Nov 2009, 23:53:03
What does the gear menu matter? I run a loop that ensures player has 0 ammo and receives the ammo with the launcher when he pulls out the launcher.
I have found no way to break it yet? I am not trying to derail, I am just inquisitive as to how you can break these scripts (if it all).
Title: Re: Disposable AT weapons - The FSM way
Post by: Fincuan on 07 Nov 2009, 00:26:38
The gear menu thingy is there to prevent the player from getting extra ammo that way, since I run no such loops here. It removes all disposable launcher ammo both before(if you have launcher in hand you have ammo) and after gear menu to prevent ammo hunting, and to keep alive the immersion of no need for rockets.

I have no idea how to break it, that's why I posted here. Actually now that you mentioned it... Using "Rearm" instead of gear menu might just do the trick :)

edit:
New version uploaded with the rearming "exploit" fixed
Title: Re: Disposable AT weapons - The FSM way
Post by: Rommel92 on 07 Nov 2009, 03:26:05
You realise the wait is a loop?
Testing it out now, its actually done pretty well.  :)
Title: Re: Disposable AT weapons - The FSM way
Post by: Fincuan on 09 Nov 2009, 22:00:44
Updated, see op. Now tested and working in MP, and the worst deadlocks should be fixed.
Title: Re: Disposable AT weapons - The FSM way
Post by: Trexian on 10 Nov 2009, 00:35:52
Personally, I think this is an excellent solution.  It just feels "better" than the other, scripted, solutions.