OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Trash Can Man on 09 Jul 2011, 01:27:35

Title: spawning vehicles on empty markers
Post by: Trash Can Man on 09 Jul 2011, 01:27:35
Can someone plz explain to me how to spawn a boat on an empty marker???  ??? I have tried using
different things with no luck... thanks!

TCM
Title: Re: spawning vehicles on empty markers
Post by: Walter_E_Kurtz on 09 Jul 2011, 16:04:30
It would be more instructive if you gave an example of a method you had tried and failed to get working.

The syntax of getMarkerPos (http://www.ofpec.com/COMREF/index.php?action=details&id=149&game=All) requires the name of the marker to be in speech marks.

Searching this sub-forum for createVehicle/createUnit and getMarkerPos might also be helpful.
Title: Re: spawning vehicles on empty markers
Post by: Trash Can Man on 09 Jul 2011, 16:09:47
I am making a mission where three objectives have to be met. I have an empty marker and named it mark1
I have an empty boat named, boat1. My objective is that when the conditions are met in my trigger, the boat will spawn on the empty marker... I have tried getmarkerpos and it didn't work...  ???
Title: Re: spawning vehicles on empty markers
Post by: Aldo15 on 09 Jul 2011, 16:35:18
Why not?

did you write this: ------->  boat1 setpos getmarkerpos "mark1"
I think it should work, if it doesn't work, Just ask me  :D

Cheers,
Aldo15
Title: Re: spawning vehicles on empty markers
Post by: Inlesco on 10 Jul 2011, 09:18:20
Write down/paste this line into trigger's 'On Activation' field and it should be working: boat1 setpos (getMarkerPos "mark1"). Actually, Aldo's example was correct, but he forgot to add '()'.

Are you planing to release your mission to public later, Trash Can Man?
Title: Re: spawning vehicles on empty markers
Post by: Trash Can Man on 10 Jul 2011, 12:57:27
that's what I forgot too!!  :blink: the bloody ()! thnx guys!
locked
TCM