Page 1 of 1

Little script please.

Posted: October 11th, 2007, 9:14 am
by oppdelta
Hi, again. Could some nice person hand a script that deletes, a set of brushes and replaces them or something like that.

Like in foy for the bell tower on the church. A tank shoots it and it blows up and then you got a hole in it.

Posted: October 11th, 2007, 9:22 am
by Pedsdude
To make something solid/unsolid:
whatever()
{
trigger = getent ("whatever_trig","targetname");
whatever = getent ("whatever","targetname");
while(1)
{
trigger waittill ("trigger",user);
whatever solid();
trigger waittill ("trigger",user);
whatever notsolid();
}
}
Make the brush you want a script_brushmodel and give it the target name of 'whatever' (in this case). The trigger has targetname 'whatever_trig', which you can also change accordingly.

To make things invisible/visible, use hide(); and show(); instead of solid(); and notsolid();

Posted: October 11th, 2007, 8:22 pm
by Nightmare
D'ont forget peds, you can also use

Code: Select all

ent delete();
:)

Posted: October 12th, 2007, 9:01 am
by oppdelta
ok so ummm... whihc i use? :?: :?

Posted: October 12th, 2007, 9:03 am
by Drofder2004
oppdelta wrote:ok so ummm... whihc i use? :?: :?
only use delete if you wish to delete the object. Deleting the object will completely remove it, if you reference the object after deleting it, your script WILL crash.

Posted: October 12th, 2007, 9:08 am
by oppdelta
what one is used on foy? in the bell tower. Of the church

Posted: October 12th, 2007, 4:26 pm
by Pedsdude
I would imagine delete was used in that, seeing as it does not return again unless you restart the map.

If you want it to be able to reappear after a certain period of time then just use hide.

Posted: October 17th, 2007, 10:21 am
by oppdelta
Image
Thanks ill give try. Soz for late reply i've been on and off.

Posted: October 17th, 2007, 9:37 pm
by Pedsdude
No problem, let us know how you get on with it.

Posted: November 9th, 2007, 8:43 pm
by Cpt.Cool
that church tower on foy, i think there is a tut on this site for blowing shit up

EDIT: here it is http://codjumper.com/forums/viewtopic.php?t=1697