Page 1 of 1

Duplicate or spawn a script object

Posted: Sat Jul 28, 2007 4:00 am
by erick
I have a forklift in my map and I have the forklift going up to this pallet type script object and picking it up and moving it to the other side of the airport runway. But I want a helicopter to fly over when the forklift is bringing the pallet over to the other side of the airport runway, and drop out a new pallet for the forklift to get on the next trip around its loop. I know how to get the helicopter scripted. But how do I spawn or somehow duplicate another solid pallet so that it will fall out of the helicopter onto the ground. (I just need the spawn part. I know how to make things move)
Image

hide/show

Posted: Sat Jul 28, 2007 4:25 am
by tltrude
Script objects with targetnames can be hidden or shown.

$my_pallet3 hide
$my_pallet3 show

So, you can hide a bunch in the sky, or hide the ones already moved and move them back to the helicopter.

Posted: Sat Jul 28, 2007 5:01 am
by erick
So, you can hide a bunch in the sky, or hide the ones already moved and move them back to the helicopter.
You took the words right out of my mouth. I didnt know how to do it but now i know. Since there is a gas barrel on the crate I will just make an explosion.

Posted: Sat Jul 28, 2007 10:00 am
by jv_map
You may also duplicate an object in this way:

Code: Select all

// duplicates any entity $t1 at the position of any entity $t2
local.clone = spawn $t1.classname model $t1.brushmodel origin $t2.origin angles $t2.angles