OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: TH on 04 Jul 2004, 19:46:09

Title: createVehicle, hide marker problem
Post by: TH on 04 Jul 2004, 19:46:09
this is what i have in a trigger in the activation field, i want a scud to appear at marker named Scud when the trigger activates.
Code: [Select]
"Scud" createVehicle getmarkerpos "Scud"what am i doing wrong? thx in advance ;D.
Also how do you hide markers like you hide objectives?
Title: Re:createVehicle, hide marker problem
Post by: macguba on 04 Jul 2004, 20:44:23
"marker1" setMarkerType "empty"
 
Syntax not guaranteed.   When you want it to appear set the marker type to "objective" or whatever you want.

A word can be used only once in a mission.   So if you have a variable "banana", you cannot have a unit called "banana" or the game will get confused.    Never call anything by a reserved variable/name for the same reason.    It may not be the problem, but don't call your marker "scud":  call it "scudMarker" or something.

How do you know it doesn't work?
Title: Re:createVehicle, hide marker problem
Post by: TH on 04 Jul 2004, 21:15:35
when i try to click ok in the trigger after putting in Scud createVehicle getmarkerpos "Scud" i get error Scud createVehicle getmarkerpos "Scud" error type object expected nothing


edit: got the marker thing to work thx=)
Title: Re:createVehicle, hide marker problem
Post by: macguba on 04 Jul 2004, 23:53:28
Ah, so there is an error in that line of code.    Make the appropriate changes and try

scud1 = "scud" createVehicle getMarkerPos "scudMarker"

Check the syntax in the comref.
Title: Re:createVehicle, hide marker problem
Post by: TH on 04 Jul 2004, 23:56:46
Alright ill post if it works out ;D
Title: Re:createVehicle, hide marker problem
Post by: TH on 05 Jul 2004, 00:01:04
ok, i made the scud and put it on a island, then did this

Code: [Select]
scud1 setpos (getmarkerpos "ScudMarker")
that should work, correct?  :)