nm_portal like water rising

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

Moderator: Core Staff

Post Reply
BatterY
CJ Worshipper
CJ Worshipper
Posts: 238
Joined: January 29th, 2010, 10:27 pm

nm_portal like water rising

Post by BatterY » March 2nd, 2010, 3:42 pm

Hello.

I'm currently making a map that will have a script that raises water from time to time.

So, i'll write some details here:

Code: Select all

Every 2nd minute waiter level raises, printing bold: Flood!! Get To Safety!! 10 seconds before water level rises and it will rise about 60 units higher than normal, and lowers back to its normal level after 30 seconds.

Here's something i've thought:

iprintlnbold("Flood!!");
wait(1);
iprintlnbold("Get to safety!!");
wait(10);
(waterlevel +60, takes 3 seconds to rise)
wait(30);
(waterlevel -60, takes 3 seconds to lower)
iprintlnbold("flood over");

I would apperciate anyone who gives his/her helping hand :)

User avatar
waywaaaard
Core Staff
Core Staff
Posts: 2214
Joined: February 6th, 2006, 3:18 pm
Location: Germany/Bayern

Re: nm_portal like water rising

Post by waywaaaard » March 2nd, 2010, 4:21 pm

Where is your water located? Just make the water brush 60 longer (z axis). Make it as a script model and then either with a origin and moveTo((0, 0, 60), 3) or moveZ(60, 3)
THAT HANDS WERE NOT TRACED!
visit my blog: Link
Soviet wrote:Yeah, watch out, Peds will hit you with his +5 D-Battleaxe of homosexuality :roll:

BatterY
CJ Worshipper
CJ Worshipper
Posts: 238
Joined: January 29th, 2010, 10:27 pm

Re: nm_portal like water rising

Post by BatterY » March 2nd, 2010, 5:12 pm

Umm.. could you give a code for it, or correct mine? And what key and value i give to it?

Code: Select all

wait(49);
iprintlnbold("Flood Warning!!");
wait(1);
iprintlnbold("Get To Safety Towers!!");
wait(10);
moveTo((-1536, -168, 120), 5)
wait(30);
moveTo((-1536, -168, 0), 5)
iprintlnbold("Flood Is Over.");
wait(1);
irpintlnbold("Be Aware Of The Next One...");
wait(60);

User avatar
Oi!mel
CJ Fan
CJ Fan
Posts: 132
Joined: January 17th, 2010, 9:26 pm
Location: Germany/Bavaria
Contact:

Re: nm_portal like water rising

Post by Oi!mel » March 2nd, 2010, 5:31 pm

Code: Select all

water()
{
water	= getent("water","targetname");

while(1)
{
wait(49);
iprintlnbold("Flood Warning!!");
wait(1);
iprintlnbold("Get To Safety Towers!!");
wait(10);
water movez (60, 5)
water waittill movedone;
wait(30);
water movez (-60, 5)
water waittill movedone;
iprintlnbold("Flood Is Over.");
wait(1);
irpintlnbold("Be Aware Of The Next One...");
wait(60);
}
}
Make the water brush.
right click > script > brushmodel
add key/value to entity:
targetname
water
Image Image Image

BatterY
CJ Worshipper
CJ Worshipper
Posts: 238
Joined: January 29th, 2010, 10:27 pm

Re: nm_portal like water rising

Post by BatterY » March 2nd, 2010, 5:41 pm

Thank you very much! :D

User avatar
Oi!mel
CJ Fan
CJ Fan
Posts: 132
Joined: January 17th, 2010, 9:26 pm
Location: Germany/Bavaria
Contact:

Re: nm_portal like water rising

Post by Oi!mel » March 2nd, 2010, 6:18 pm

There is a bug:
water movez (60, 5);
water movez (-60, 5);

Forgot it
Image Image Image

BatterY
CJ Worshipper
CJ Worshipper
Posts: 238
Joined: January 29th, 2010, 10:27 pm

Re: nm_portal like water rising

Post by BatterY » March 2nd, 2010, 7:36 pm

ok, fixed that

User avatar
Rezil
Core Staff
Core Staff
Posts: 2030
Joined: July 24th, 2006, 11:21 am
Location: Cramped in a small cubicle/making another jump map

Re: nm_portal like water rising

Post by Rezil » March 3rd, 2010, 3:07 pm

The water will wait for 109 seconds? :o
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.

User avatar
Rezil
Core Staff
Core Staff
Posts: 2030
Joined: July 24th, 2006, 11:21 am
Location: Cramped in a small cubicle/making another jump map

Re: nm_portal like water rising

Post by Rezil » March 3rd, 2010, 4:28 pm

KillerSam wrote:That's what the code says :!:
Every 2nd minute waiter level raises, printing bold: Flood!! Get To Safety!! 10 seconds before water level rises and it will rise about 60 units higher than normal, and lowers back to its normal level after 30 seconds.
Reason for me being amazed. :)
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.

User avatar
Oi!mel
CJ Fan
CJ Fan
Posts: 132
Joined: January 17th, 2010, 9:26 pm
Location: Germany/Bavaria
Contact:

Re: nm_portal like water rising

Post by Oi!mel » March 3rd, 2010, 6:17 pm

No
wait(49);
iprintlnbold("Flood Warning!!");
wait(1);
iprintlnbold("Get To Safety Towers!!");
wait(10);
First part takes 1 minute
water movez (60, 5)
water waittill movedone;
wait(30);
water rises 60 units, and wait 30 seconds
water movez (-60, 5)
water waittill movedone;
water drops
iprintlnbold("Flood Is Over.");
wait(1);
irpintlnbold("Be Aware Of The Next One...");
wait(60);
last part, wait for another minute

That meens its 2 minutes dropped, then it rises again.
Image Image Image

User avatar
Oi!mel
CJ Fan
CJ Fan
Posts: 132
Joined: January 17th, 2010, 9:26 pm
Location: Germany/Bavaria
Contact:

Re: nm_portal like water rising

Post by Oi!mel » March 3rd, 2010, 6:38 pm

well, that is what you said xd. having my problem with that language, sorry. but whats the proplem? you don't get it?
Image Image Image

User avatar
Rezil
Core Staff
Core Staff
Posts: 2030
Joined: July 24th, 2006, 11:21 am
Location: Cramped in a small cubicle/making another jump map

Re: nm_portal like water rising

Post by Rezil » March 3rd, 2010, 7:05 pm

Sorry, didn't see the 2 minutes part, my bad! Thought he only wanted it for 30 seconds. :)
Drofder2004: Drofder's rules for reviewing a map
[...]
#5 If your name is Rezil, minimum 5/5.
---
<LT>YosemiteSam[NL]:
I heard somewhere that the best way to start is juggling 2 balls with one hand, so you will get a feel for it.

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

Re: nm_portal like water rising

Post by Nightmare » March 4th, 2010, 7:39 pm

Please don't have your in map targetname simply be "water".
What I suggest to most scripters is to add their map name in front to avoid conflicting with other maps.
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]

xeno
CJ Wannabe
CJ Wannabe
Posts: 38
Joined: October 31st, 2007, 12:37 am
Location: United States - GA

Re: nm_portal like water rising

Post by xeno » March 4th, 2010, 7:49 pm

Rez|l wrote:Sorry, didn't see the 2 minutes part, my bad! Thought he only wanted it for 30 seconds. :)
Ha ha. I was waiting for you to say that :D
Image

Post Reply

Who is online

Users browsing this forum: No registered users and 37 guests