Duplicate or spawn a script object

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
erick
Major
Posts: 280
Joined: Wed May 30, 2007 1:14 am
Location: USA

Duplicate or spawn a script object

Post 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
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

hide/show

Post 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.
Tom Trude,

Image
User avatar
erick
Major
Posts: 280
Joined: Wed May 30, 2007 1:14 am
Location: USA

Post 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.
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post 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
Image
Post Reply