OFPEC Forum
Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: Pathy on 12 Sep 2004, 01:34:24
-
I want to use Mapfacts airport stuff, including the radar tower ect, that require scripts to inititalise....now in the Mapfact readme, as far as i can make out (its in German), it says, to use the object number assigned by WRPtool.
If anyone knows how to find out what an objects number is so i can initialise the script, i'd be grateful. ;)
-
If the objects are placed in the wrp file you can view the Object ID when you zoom in real close in the Mission Editor.
I hope I understood your question right.
Planck
-
Correct. however binarize will re-ID the objects on your wrp, so you will have to update the object ID's in you mission after each time you pass the wrp through binarize. You may want to note down the position from the object inspector tool to help you find the object easier...
how about
_mapfactobject = nearest [x,y,z, "type"]
_objectID = format ["%1", _mapfactobject]
?
Hope this helps.
-
If the objects are placed in the wrp file you can view the Object ID when you zoom in real close in the Mission Editor.
I hope I understood your question right.
Planck
Isnt that just like the name of the object, in this case AIR/radar and AIR/radar tower. Doesnt each object have a unique ID and thats the ID you use to initialise the script. And i'm only planning on binarizing everything once ;)
-
NO.........In the Mission Editor, if you zoom in close on the map you will see the object ID's.
You need to press the 'Show IDs' button first though and you need to be in Advanced mode.
Planck
-
Ahh coulda told me to press the show ID buttons ;D
Thanks.
EDIT: One other thing. At the moment i have the scripts initialised by a trigger that activates on startup. Is possible to initialise a script in the WRP config instead? Kinda like you do with units?
I think the answers no, but if anyone knows otherwise or can merely confirm my guess that its not possible, again i'd be gratefull.
-
Alas, Init Eventhandlers don't work for Wrp placed objects.......sorry.
I wish they did.
Planck
-
Yup tried it and it didnt work, just wondering if there was another way :-\
Ahh well, i think its time to learn how to create a gamelogic :P
Thanks for all your help, its much appreciated!