OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Cpl. Vagabond on 01 Apr 2003, 23:54:53

Title: Help with my pitch tent
Post by: Cpl. Vagabond on 01 Apr 2003, 23:54:53
i've had a go at the pitch tent thing myself i've got

Quote
_unit = _this select 0
#loop
"acr_stan" createVehicle [(getpos _unit select 0)2.50,(getpos _unit select 1)-0.001,(getpos _unit select 2)+0.001]
_unit _removeAction 0
goto "pitched"
#pitched
_unit _addAction [""Take Down Tent""]

goto "pitched"

#end
exit

but it's unfinished and i'm slightly stuck...help please someone
- i need the Take Down Tent to make the tent disappear
- i think goto "pitched" might cause the 'Take Down Tent' action to be created multiple times.

i'm only a beginner and some help would be very.....ummmm...whats the word...ummm.......helpful

Thx in advance
Cpl. Vagabond
Title: Re:Help with my pitch tent
Post by: _hammy_ on 02 Apr 2003, 02:47:26
Code: [Select]
Unit = _this select 0

Tent = "acr_stan" camCreate getpos player
Taked = Unit AddAction [FORMAT["Take down tent"],"takedown.sqs"]

exit

create a new script called "takedown.sqs" and put it in the same directory as the script above.

put the following in the second script
Code: [Select]
Unit removeaction Taked
Tent setpos [getpos Tent select 0, getpos Tent select 1, (getpos Tent select 2) -10]

exit

The first script will place the tent where the player is and add the action to take down the tent.  Though im not sure if acr_stan is the right name for the tent...


The second script will "bury" the tent 10 meters underground so it will not be visible anymore.

I am not 100% sure that the script works though... :P
Title: Re:Help with my pitch tent
Post by: Cpl. Vagabond on 02 Apr 2003, 12:04:30
i don't actually know the name for the tent because i can't get it to show up in my editor...if anyone knows the name please can you tell me so that i can get this working. also  can someone do me a massive favor and put the static LSD onto the desert island map, save it and attach it to a post because i can't get the static lsd to load in the editor which is really starting to bug me.

thx in advance
cpl. vagabond
Title: Re:Help with my pitch tent
Post by: Cpl. Vagabond on 02 Apr 2003, 17:27:22
i've got it working fine but i thought the tent would be bigger (but it's not so eh), like at least big enough to fit 1 person in (it's not), i will now look for a substitute, unless the ACR team can increase the size of the tent. but i would like to fix it so it doesn't appear under the infantry which creates it but about 2 metres in front, and i'd like the screen to fade to black (he he FADE TO BLACK) and then fade back again...with a tent
Title: Re:Help with my pitch tent
Post by: KA-KUI on 03 Apr 2003, 18:49:16
Not a scripter my self but, couldn't you warp the tent in and out using getPos SetPos?
Saw this on Kaliyuga's post here: http://www.ofpec.com/yabbse/index.php?board=18;action=display;threadid=246