OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Freak on 12 Sep 2002, 10:05:57
-
i need a script that will cause those metal blue targets to pop back up again for reuse, i seen it before cant find it plz help. Also if u guys have a script that will cause them to lay down in the beginning and then pop up at random
(sort of like moving duck targets )
-
I had one going that was like what you're talking about.. and it's actually pretty easy to make your own ;) just name those objects (tar1 and tar2 for my example ) and use alot of setpos commands, thats about it really .. would look something like this:
tar1 setpos [getpos this select 0, getpos this select 1,1]
~2
tar1 setpos [getpos this select 0, getpos this select 1,0]
~2
tar2 setpos [getpos this select 0, getpos this select 1,1]
~2
tar2 setpos [getpos this select 0, getpos this select 1,0]
basically you just do that over and over for however many targets you have.. then make it loop for a continious effect.. the syntax I used will make the target lift a meter off the ground, hold for two seconds, and then drop back down ..
Of course you can put a setpos command in the targets init field to make it start "down"
have fun with it :toocool:
-
i think dat 2 make em pop up again u just need 2 use da setdammaqe 0 command wenever u want
nameoftarget setdammage 0
nd 2 make em startlyin just make
nameoftarget setdammage 1
LCD OUT
-
Setdammage does not effect the targets vertical position.
-
damn didnt know dat :)
LCD OUT
-
The best way is to set the target in the ground, then move it vertically when you want to shoot it. As the above script does.
-
ok thats not what i mean, but thanks for another idea. what i mean is i want the targets to be on the floor(laying down) then when i set off a tigger i want the targets to pop back up at (also consider that there will be serveral targets which i would like for them to pop up at random)
For example say i got five targets laying down on the ground in different area of map. and lets say i had a script that makes them pop up in a random order such as this 5 2 4 1 2 3 3 5 4 1
each number represents a target (plz keep in mind that its random,, and if script cant be made random that ok any scipt that will let me do this is fine
Thanks again ::)
-
As Icarus said:
The best way is to set the target in the ground, then move it vertically when you want to shoot it. As the above script does.
You can use a negative number at the end of that syntax to make the object start below ground, and then "pop up", but there are no commands in OFP to effect tilt or camber of an object....
As far as assigning some randomness to the whole thing, I'm guessing that you could make all the targets into an array and then use something in your script that randomly chooses the objects from the list....
But I wouldn't know too much about that myself.. ;) I would assume that scripting an order out would be sufficient anyways
-
here is idea use da createvehicle command ;) should do ;D
LCD OUT
[edit] or u can get da animated pop up targets from here (http://www.opflashpoint.org/addons.php?v=306)
-
i didnt mean that but thats a good idea what i meant was the targets lay as if they been shot down. Then pop back up when the script is trigger but thanks i probably use your idea if anything
As Icarus said: The best way is to set the target in the ground, then move it vertically when you want to shoot it. As the above script does.
You can use a negative number at the end of that syntax to make the object start below ground, and then "pop up", but there are no commands in OFP to effect tilt or camber of an object....
As far as assigning some randomness to the whole thing, I'm guessing that you could make all the targets into an array and then use something in your script that randomly chooses the objects from the list....
But I wouldn't know too much about that myself.. ;) I would assume that scripting an order out would be sufficient anyways
-
Everyone knows what you want. We are trying to say you cant do it. It cant be done. Then we go on to say that there is another way of getting an effect that is hopefully suitable.
-
[icarus_uk] already said how to do what u wanted. to make the target lay down as if it has been shot set its damage to 1 and then to make it pop up set its damage to 0. to make them pop up randomly u will need a script. basicly give all the targes a number between 1-5 and then get the script to select a number at random between 1-5, which will then pop up the target which coresponds to that number
-
No thats not what I said. I said that SetDammage DOES NOT effect them.
-
Are you sure?
I made two radio triggers, then in one target setdammage 4, and the other target setdammage 0.
It fell over then erected back up.
But i think Freak wants it to be like a shotting gallery :P
8)PEACE
-
sorry [icarus_uk] i got the wrong name i was refering to what LCD had said.
-
Hmm just to clear something else up ... setdammage is between 0 and 1.0 using 4.0 does not result in any more damage or bigger explosion...
-
Apart from the drunk guys ;) :cheers:
8)PEACE
-
Im unsure if this will work but usually when u set an AI's behaviour to stealth they lay down.. Maybe u could switch the behaviour from Stealth to Aware then back to Stealth?..
would look like this:
p1 setbehaviour "STEALTH"
p2 setbehaviour "STEALTH"
p3 setbehaviour "STEALTH"
~2
p1 setbehaviour "AWARE"
~2
p1 setbehaviour "STEALTH"
~2
p2 setbehaviour "AWARE"
~2
p2 setbehaviour "STEALTH"
~2
p3 setbehaviour "AWARE"
~2
p3 setbehaviour "STEALTH"
~2
Not sure if this would work better or worse or at all :-\