OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: bedges on 29 Dec 2011, 21:45:54

Title: Spawning game logics
Post by: bedges on 29 Dec 2011, 21:45:54
So I'm spending some holiday time converting some of my old OFP scripts to work in Arma2 and I've hit a pretty major snag. I cannot spawn game logics. Or I can spawn them, but I can't move them. For example:

Code: [Select]
_gl = "Logic" camcreate getpos player
player setpos getpos _gl

puts me in the sea each and every time. I'm therefore not even sure that the game logic has even spawned.

Is "Logic" not the right name? Should I be using createvehicle instead? Doesn't seem to make a difference. Is there a time delay which I need to account for?

 :dunno:
Title: Re: Spawning game logics
Post by: h- on 30 Dec 2011, 00:38:57
As far as I know in A2 you have to use createVehicle or createUnit (can't remember which it was  :-[ ) for logics, camCreate no longer works with anything else than actual cameras..
Title: Re: Spawning game logics
Post by: bedges on 01 Jan 2012, 02:10:52
It appears that one must use createvehiclelocal (http://www.ofpec.com/COMREF/index.php?action=details&id=456&game=All) for it to work. Trial and error. It's like the last 10 years never happened...