OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: nominesine on 22 May 2008, 21:58:22
-
Is there a way to detect wether a mine (placed from the editor) has been deactivated or not?
I know that Sui worked hard with this problem when he was working on Facile Ground (http://www.ofpec.com/missions_depot/index.php?action=details&id=50&page=3&game=OFP&cat=sp&sort=edid) back in 2002. As far as I remember he never solved it. Does someone have a working solution to this delicate problem. Preferably one that isn't too complicated.
-
Compare animation states, correct me if I'm wrong but mines when deactivated "tilt"... :dunno:
Rommz,
-
Mines don't seem to have animationStates. And the animationPhase command only returns a string saying "scalar"
-
For shits and giggles, try vectorUp (http://www.ofpec.com/COMREF/index.php?action=list&game=All&letter=v#808) or one of the other associated vector-commands. Since it DOES tilt one would think it might even change vectors or somesuch in there, no?
Secondly, once again for shits and giggles, you could try the animation commands on the UNIT performing the action - once in a blue moon BIS will have given the animation to do something a unique name and entry, while the actual animation played is still the usual "bend down and tie your shoelaces" one. By using that around mines in some kind of watching script, you might be able to see if the mines have been deactivated or not?
And finally, take a good look at this (http://kronzky.info/minefield/index.htm) beauty - it can among other things return the number of active mines in the minefield, so if nothing else you can pick it apart and figure out how he did it, or simply use it as it is for your mission!
Wolfrug out.
-
You could try the animation commands on the UNIT performing the action
Brilliant. Why didn't I think of that. If it works I'm going to convert my mission Safe House from OFP to ArmA... and I promise to keep it completely Queens Gambit-free ;)
-
@nominesine i have always enjoyed your missions looking foreword to this in ArmA!
@Wolfrug
Secondly, once again for shits and giggles,
what a nice phrase, very handy words there :D downunder here in aussie land ,,,, i forgot all about phrases like that, they dont say that one there!!!!
-
Just pointing out that not one object 'pointer' commands work with mines, basicly the mine objects do not exist in the same universe as the other objects do.
If you for example give a name to a mine object and try to 'access' the mine by using the name nothing happens because the mine isn't really there..
AFAIK the only way you can refer to a mine object is with the nearestObject commands, but I don't know whether that would do any good either..
-
not one object 'pointer' commands work with mines /.../ the only way you can refer to a mine object is with the nearestObject commands
I also noticed this yesterday. Annoying. I had the same problem when i was building Safe House for OFP. I must install flashpoint again and check how I handled the issue back then.
-
I was thinking of converting missions. How are you going to go about it?
-
Check this (http://www.ofpec.com/forum/index.php?topic=29989.0).
-
@The-Architect me too! should start a new thread on that,,, but i dont think it would be that hard to convert. just the script calls ,,, of {} and so on.....
-
I was thinking of converting missions. How are you going to go about it?
I'll build them from scratch again. The most time consuming part (for me) has always been the plot. With that settled, mission making is merely a mechanical process. And it's fun to build stuff :D And I supposed Mandoble has solved my initial question. Will try the solution ASAP.
-
hey ,,, as you rebuild them they get better anyways ;)
-
And finally, take a good look at this (http://kronzky.info/minefield/index.htm) beauty - it can among other things return the number of active mines in the minefield, so if nothing else you can pick it apart and figure out how he did it, or simply use it as it is for your mission!
Thanks. With a slight modification the aforementioned download solved the problem. I've never fully realised how powerful sqf-scripting can be until now.