OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Guru on 29 Oct 2002, 09:34:45
-
ive searched here for info, but theres nothing on it anywhere.
ive tried everything to get those commands to work
but to no-avail ???
do they actually work ?
oh and yes i know about 1.75 bug
but still would like info as i have earlier version installed
-
this will find the nearest jeep to the player
_vehicle = nearestObject [player, "jeep"]
then you can use something like _vehicle lock false, if you look in the com ref you can use any object with a + next to its name.
-
(Orig. rep by Sui) :
:o This demonstrates how to detect if a building (fuelstation) has been destroyed.
The trigger will activate when the fuel station expodes
---Mission components
GameLogic
This Gamelogic variable defines the fuel station which is going to get blown up.
It is placed right next to the fuel station and has and init line of:
fstn = nearestobject [this,"fuelstation"]
This makes "fstn" the fuel station needing to be blown up.
The trigger has the condition line:
not (alive fstn)
It uses fstn, already defined by the gamelogic above.
It sets off a hint when the fuel station is destroyed.
You would put your objective commands/win commands in the OnAct line,
so they activate when the fuel station is destroyed.
-----------
To light up a streetlamp (in version 1.75) :
Just click the "show ID" button and find your streetlamp (you may need to zoom in quite close for the ID's to show up).
Take down it's number, and use a line like this:
(object 37317) switchlight "on"
To turn it on, "off" to turn it off and "auto" to set it to default (on during night, off during day).
PS. as far as I remember, both "nearest..." AND the object ID stuff will do in 1.85 :D
Laterz :-*
-
so theres no way to get a nearestobject, of whatever type, happens to be near, at the time. IE:
a bush,building,smallshad, whatever?
it has to be named?
i wanted to be able to get whatever object was near.
based on knowsabout condition.(of the enemy)
and have dude dive for cover.
but not all scripted for a certain local,just generally triggered anytime anywhere.