OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Cougar on 18 Jun 2003, 07:35:34

Title: Bringing back up the targets
Post by: Cougar on 18 Jun 2003, 07:35:34
Hello guys! Anyone is aware of a script where u can bring back the shooting range target up once they are down? Those target might not be in a shooting range but arround on a map, but i want to be able to put them back up. Anyone know?


Thank You!
Title: Re:Bringing back up the targets
Post by: Babalon on 18 Jun 2003, 07:47:08
Well a down target is a destroyed object to OFP.  What your looking for my friend is nothing more than a respawn script.
Title: Re:Bringing back up the targets
Post by: Cougar on 18 Jun 2003, 08:45:10
ok my bad i forgot to say something :( I want like a button to make the action to pop them up so only when the button is pressed they come up.
Title: Re:Bringing back up the targets
Post by: Hellcow_2RHh on 18 Jun 2003, 09:09:30
You can do that. Before about a year ago, when i knew all of this.
I remember doing that.

U need to use a Respawn script. Then Tie it toghether with a Trigger. That is Activated with a Radio Command...
i dont remember HOW you do it. But that is how i did it.

Make sure u set the Trigger to Repeatadly. Or it will only work once.

I hope that helps.
Title: Re:Bringing back up the targets
Post by: Hellcow_2RHh on 18 Jun 2003, 09:11:30
Cougar, I am making a Tranning map. For Resistance V1.91

If you want, i can send you the Map and we can play on it toghether, I need someones input on it. if u help me with that. then i will help you with your Respawning Targets Problem...

Use my contacts listed below to contact me.
Title: Re:Bringing back up the targets
Post by: Hellcow_2RHh on 18 Jun 2003, 10:15:01
Hey Cougar, I got it Figured out for ya bro.

Contact me With one on my messengers, or Email me at

Hellcow10@hotmail.com

I was had like a freaking Page typed on how to do this, then i tried adding some pics, 50KB!!!!!!! MAX!!!!!
WTF IS THAT

hardly any pic for OFP is under 50KB!

Anyways. I tired submitting it and it didnt work.
so, I am not typing it all back out tonight.
So...
Get with me, and i will get you hooked up.

If u send me the mission i will even do it for you.
ttyl
Title: Re:Bringing back up the targets
Post by: Igor Drukov on 18 Jun 2003, 11:45:09
Hi all,

Just one thing : if Cougar is speaking about
 
Quote
shooting range targets
that is, the ones that come under "Target E" in the editor, there is no need for respawn scripts.

Targets will raise if you setdammage them to 0, and you just have to add an "addaction" to the guy that will bring them back up :

Code: [Select]
_myguy addaction ["Raise Targets","target.sqs"]
Where "target.sqs" is something like :

Code: [Select]
target0 setdammage 0
target1 setdammage 0
etc.

Title: Re:Bringing back up the targets
Post by: LCD on 18 Jun 2003, 11:48:16
@ igor

it wont work ;) ;D

targets dat r falled wont b raised up in ny way  :-\ also u forgot da [ in ur 1st line ;D

Quote
_myguy addaction "Raise Targets","target.sqs"]

shud b

_myguy addaction ["Raise Targets","target.sqs"]

da script shud delete da old targets nd createnew 1s instead ;D

LCD OUT
Title: Re:Bringing back up the targets
Post by: Igor Drukov on 18 Jun 2003, 11:51:55
Gee LCD you're fast, just give me the time to re-read myself !

Actually it does work for targets (I've just tested it) : if you setdammage them to 0, they're back on their feet...
Title: Re:Bringing back up the targets
Post by: LCD on 18 Jun 2003, 15:53:11
rofl ;D

strange it didnt work 4 me  :-\ but dat was ages ago ::) or mebe i just forgot dat it did ?

LCD OUT
Title: Re:Bringing back up the targets
Post by: Hellcow_2RHh on 18 Jun 2003, 20:44:41
Those Methods seem Easier than mine. lol
Title: Re:Bringing back up the targets
Post by: Hellcow_2RHh on 18 Jun 2003, 20:46:31
LCD, do u try to use the worst Grammar possible?

Or can u just not speak english?

(Serious Question. Not making fun)<< For the Moderaters =D
Title: Re:Bringing back up the targets
Post by: Messiah on 18 Jun 2003, 21:09:04
lol - dont start that again - u get used to it, LCD is a good lad  :D

oh, and heres a script i did for a shooting range with pop up targets... might be worth a look?

Code: [Select]
_targets = [tag_1,tag_2,tag_3,tag_4,tag_5,tag_6]
"_x setpos [getpos _x select 0, getpos _x select 1, -2]" foreach _targets

#select
? count _targets == 0 : Hint "All Targets destroyed"; sniperfinished1 = false; snipertrainingdone = true; player addRating 1000; exit
_random = random (count _targets)
_random = _random - _random % 1
_target = _targets select _random

_pos = getpos _target
_x = _pos select 0
_y = _pos select 1
_z = _pos select 2

_delta = 2
_increment = 0

#up
~0.01
_target setpos [_x,_y,_z + _increment]
_increment = _increment + 0.05
? getpos _target select 2 < _z + _delta : goto "up"

~(random 2) + 2

#down
~0.01
_target setpos [_x,_y,_z + _increment]
_increment = _increment - 0.05
? getpos _target select 2 > _z : goto "down"

? getdammage _target > 0.9 : _targets = _targets - [_target]
~(random 2) + 2

goto "select"
Title: Re:Bringing back up the targets
Post by: LCD on 19 Jun 2003, 01:09:39
Quote
LCD, do u try to use the worst Grammar possible?

Or can u just not speak english?
 

mebe ::)

or im just bringin som style into da forums ;D ;) :P

nah its just dat eng is ma 3rd lang ;D

mostly learn it from da CDs i have ;D :D

@ mezzy tanks 4 da support ;D

im invitin u 2 ma party ;D just got ma summer holiday started ;D :wow:

(http://216.180.247.115/zz/intheclub.gif)

LCD OUT
Title: Re:Bringing back up the targets
Post by: 3rdRecon on 19 Jun 2003, 02:49:53
Hey guys, I am old on OFP but new on mission making. I am working on something similiar. I want to add up to 3 targets to a given trigger, have the targets down until a soldier enters the trigger,then popup.  Should the target be hit have it go down and stay down. Any ideas?