Little script please.

Have questions about CoD/UO mapping that aren't covered in the tutorials section? Post here!

Moderator: Core Staff

Post Reply
User avatar
oppdelta
CJ Fan
CJ Fan
Posts: 107
Joined: June 3rd, 2007, 2:24 pm

Little script please.

Post by oppdelta » October 11th, 2007, 9:14 am

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.

Pedsdude
Site Admin
Site Admin
Posts: 15909
Joined: October 15th, 2004, 7:18 pm
Location: UK

Post by Pedsdude » October 11th, 2007, 9:22 am

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();
Image
Image

User avatar
Nightmare
Core Staff
Core Staff
Posts: 2688
Joined: January 12th, 2006, 10:09 pm
Contact:

Post by Nightmare » October 11th, 2007, 8:22 pm

D'ont forget peds, you can also use

Code: Select all

ent delete();
:)
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet

-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]

User avatar
oppdelta
CJ Fan
CJ Fan
Posts: 107
Joined: June 3rd, 2007, 2:24 pm

Post by oppdelta » October 12th, 2007, 9:01 am

ok so ummm... whihc i use? :?: :?

User avatar
Drofder2004
Core Staff
Core Staff
Posts: 13313
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Post by Drofder2004 » October 12th, 2007, 9:03 am

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.
Image
Virgin Media 20Mb Broadband:
"Perfect for families going online at the same time, downloading movies, online gaming and more."
Borked internet since: 22-07-2010

User avatar
oppdelta
CJ Fan
CJ Fan
Posts: 107
Joined: June 3rd, 2007, 2:24 pm

Post by oppdelta » October 12th, 2007, 9:08 am

what one is used on foy? in the bell tower. Of the church

Pedsdude
Site Admin
Site Admin
Posts: 15909
Joined: October 15th, 2004, 7:18 pm
Location: UK

Post by Pedsdude » October 12th, 2007, 4:26 pm

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.
Image
Image

User avatar
oppdelta
CJ Fan
CJ Fan
Posts: 107
Joined: June 3rd, 2007, 2:24 pm

Post by oppdelta » October 17th, 2007, 10:21 am

Image
Thanks ill give try. Soz for late reply i've been on and off.

Pedsdude
Site Admin
Site Admin
Posts: 15909
Joined: October 15th, 2004, 7:18 pm
Location: UK

Post by Pedsdude » October 17th, 2007, 9:37 pm

No problem, let us know how you get on with it.
Image
Image

User avatar
Cpt.Cool
CJ Worshipper
CJ Worshipper
Posts: 204
Joined: May 31st, 2007, 2:27 am
Contact:

Post by Cpt.Cool » November 9th, 2007, 8:43 pm

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
Image
Image
YaNo wrote:I use Cool as my UO compiler :) Try it, it works!

Post Reply

Who is online

Users browsing this forum: No registered users and 37 guests