Script Needed...

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

Moderator: Core Staff

User avatar
YaNo
CJ Worshipper
CJ Worshipper
Posts: 460
Joined: May 5th, 2005, 9:34 pm
Location: Azeroth
Contact:

Script Needed...

Post by YaNo » October 16th, 2006, 4:53 pm

i need a couple of scripts for upcoming maps ect...
ill just start from zero ;)

so first (1):

Code: Select all

i want lights that are pulsing (script?)
second...(2):

Code: Select all

this 1 is harder: if you are touching a certain trigger_multiple and you put in a cvar, you'll get teleported :P
that is going to be good for secrets :P

last but not least(3):

Code: Select all

uuuuh... some help with sound inserting into map :D how to let a sound play when i'm in a certain trigger? :)
Ty for even looking :P

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

Post by Nightmare » October 16th, 2006, 10:11 pm

I can answer all three of these

1.I have a file that was posted alittle while ago which involved blinking lights,

Heres the link:http://download.yousendit.com/313A824F37029C40

Just look into it and try and learn it. The .map, sfx and gsc files are all in there.

2.Just do what I did in nm_portal. All you make is a trigger_multiple and then just use this

Code: Select all

teleporter()
{
use = getent("teleporter_switch","targetname");
multiple1 = getent("teleporter_tele1","targetname");
while(1)
   {
   use waittill ("trigger",user);
   players = getentarray("player","classname"); 
   for(i=0;i<players.size;i++)
   {
      if(players[i] isTouching(multiple1))
      {
         players[i] setOrigin( (-864, -64,-2552) );
      }
      wait(3);
   }
   }
}
}
Just change the targetnames and courdinates and make the multiple one trigger big enough to surround a room or where ever you want it. The use is the button that one person can trigger.

3.Ok, what you want to do is grab a .wav file and then put it in sound/misc
After that make another folder called soundaliases and put the following in

Code: Select all

,name,name of the alias that is used to play this sound (required)
,sequence,"used to uniquely identify alias entries when more than one sound goes to an alias, used only to catch unwanted duplicates (default = 0)"
,file,the name of the file that contains the sound data (required)
,vol_min,"0 is silent, 1 is full volume (default = 1)"
,vol_max,"0 is silent, 1 is full volume (default = same as vol_min)"
,pitch_min,"1 is normal playback, 2 is twice as fast, 0.5 is half as fast (default = 1)"
,pitch_max,"1 is normal playback, 2 is twice as fast, 0.5 is half as fast (default = same as pitch_min)"
,dist_min,"within this distance in inches, the sound is always full volume (default = 120)"
,dist_max,"outside this distance in inches, the sound is not started.  If left blank or set to 0, the sound will play from any distance.  This does not affect sound volume falloff."
,channel,"auto, menu, weapon, voice, item, body, local, music, announcer (default = auto)"
,type,streamed / loaded (default = loaded)
,probability,weight to use for the weighted probability of playing this sound instead of another sound (default = 1)
,loop,"whether this sound is ""looping"" or ""nonlooping"" (default = ""nonlooping"")"
,masterslave,"if ""master"", this is a master sound.  If a number, then this sound won't exceed this volume whenever any master sound is playing.  If blank, then neither master nor slave."
,loadspec,"space-separated list of which maps should use this alias; eg, ""burnville dawnville"".  If blank, the alias is used on all maps."

name,sequence,file,vol_min,vol_max,pitch_min,pitch_max,dist_min,dist_max,channel,type,probability,loop,masterslave,loadspec,subtitle

null,1,null.wav,,,,,,,,,,,,,

#Sounds,,,,,,,,,,,,,,,


awsome,,misc/awsome.wav,1,1,,,2000,2000,auto,,,nonlooping,,,
Then in the gsc file put the following

Code: Select all

funfair_drop() 
{ 
trigger = getent ("funfair_drop_trig","targetname");
awsome_sound = getent ("awsome_sound","targetname");
while(1)
{
trigger waittill ("trigger");
awsome_sound playsound("awsome");
}
}
There you go :)
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]

HavoC
CJ Fan
CJ Fan
Posts: 104
Joined: September 12th, 2006, 1:27 am

script needed...

Post by HavoC » October 17th, 2006, 12:44 am

ok,, i hope you guyz would mind but could u give me a couple scripts im looking for,, i just got into scripting so im not that familiar with it or wut to do.... so i was wondering how you:

1:make a script so wen u go over a certain part of the map u go speeding ex: pinball by nightmare bunches of it in there, also jump-it,,

2:i would like 2 know how to make things spinaround in a circle.. up to down not side to side,,,

3:i would also like to know how to pile up the floor,, like at the end of portal

4: last i would like to know how to make fire come out of a hole like a volcanoo or something



in advanced thx for helping,, as i am a noob wen it comes to scripting:D :lol:

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

Post by Nightmare » October 17th, 2006, 1:10 am

1. I did that by makeing a ladder and slanting it. This has nothing to do with scripting.

2. Make a platform, then put an origin brush in the middle. Select both the origin and brush and make them script_brushmodel together and give them a name.
Heres the script:

Code: Select all

spinner1() 
{ 
spin = getent("spinner","targetname");  
while (1) 
{ 

spin rotateyaw(-360, 5);

spin waittill("rotatedone");
} 
}
Just edit the targetnames and time it takes to rotate a full 360.

3. For that I made each step a script brushmodel and then made them go up, one by one, all 40 of them. :P

4. Get a courdinate on radiant and put your mouse over the spot you want the fire to appear in the 2d Grid.
For X I get -96 and Y i get 168. Then I hit ctrl + tab to get a side view in the 2d grid and I see that Y is 192.
Just take those courdinates and put them in the right spots. ((X,Y,Z)burntime)

Code: Select all

level._effect["fire"] = loadfx ("fx/fire/smallbon_1.efx");
maps\mp\_fx::loopfx("fire", (-96, 168, 192), 0.6);
There you go :)
(I am on a roll :P)
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]

HavoC
CJ Fan
CJ Fan
Posts: 104
Joined: September 12th, 2006, 1:27 am

scripting needed

Post by HavoC » October 17th, 2006, 1:14 am

sweeeet! ty nightmare ill try it out,, hmmm just tryed it out and it didnt work...... i made a cylinder origin.. a flat surafe going through it named them spinner then i named the gsc spinner..... that didnt wrk so i named the map spinner1 and named gsc spinner1 and it didnt work :\?

HavoC
CJ Fan
CJ Fan
Posts: 104
Joined: September 12th, 2006, 1:27 am

script needed

Post by HavoC » October 20th, 2006, 9:31 pm

it now works ty,,


i am working on a cemetary map now, and i was wondering if it is possible to make something pop out of the ground,, like put an actor in the whole and once u pass a point he pops out of the whole, i personally think its impossible to do so i was just checking,, if it ispossible wut is the script?


ty in advanced

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

Post by Nightmare » October 20th, 2006, 10:00 pm

Well a way you could do it is make a picture of a ghost or whatever you are wanting to appear and texture it onto a brush. After doing so, you can make the brush a script brush model and make it so when a person passes a trigger the script brush model comes out of the ground.
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]

HavoC
CJ Fan
CJ Fan
Posts: 104
Joined: September 12th, 2006, 1:27 am

script needed

Post by HavoC » October 20th, 2006, 10:14 pm

ok ill try ty :P

HavoC
CJ Fan
CJ Fan
Posts: 104
Joined: September 12th, 2006, 1:27 am

script needed

Post by HavoC » October 21st, 2006, 5:15 pm

how do you make a russian spwn ? ty in advanced

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

Post by Nightmare » October 21st, 2006, 5:39 pm

All you have to do is just put in a gsc file with the following

Code: Select all

main() 
{ 
game["allies"] = "russian"; 
game["axis"] = "german"; 

game["russian_soldiertype"] = "veteran";
game["russian_soldiervariation"] = "winter"; 
game["german_soldiertype"] = "fallschirmjagergrey"; 
game["german_soldiervariation"] = "winter"; 

game["attackers"] = "allies"; 
game["defenders"] = "axis"; 
} 
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]

HavoC
CJ Fan
CJ Fan
Posts: 104
Joined: September 12th, 2006, 1:27 am

script needed

Post by HavoC » October 21st, 2006, 8:43 pm

ok but how do i make a spwn for them?does it automatically do it? ty very much btw :D

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

Post by Nightmare » October 21st, 2006, 11:20 pm

just use tdm or dm spawns and it will work
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]

HavoC
CJ Fan
CJ Fan
Posts: 104
Joined: September 12th, 2006, 1:27 am

script needed

Post by HavoC » October 22nd, 2006, 11:41 pm

ok thank you very much :P


but sadly i need 1 more script.. i KNOW ive said before that it was last one but im serious this time :P

i just need to know how to make an elevator script to make it stop at each florr of a building i made


TY and i promise this will be last one :(

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

Post by Nightmare » October 22nd, 2006, 11:46 pm

Its fine, ask all you want. But I would like alittle more detail, do you want it to go up and stop every so levels, wait, go up, wait go up?

Or do you want it so you can control the elevator from inside?
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]

HavoC
CJ Fan
CJ Fan
Posts: 104
Joined: September 12th, 2006, 1:27 am

script needed

Post by HavoC » October 23rd, 2006, 12:07 am

thx, well my building is 7 stories and if its not that difficult i would like it so u have to make it go up or down,
if it is possible id like it so u can press like 1 ull go floor 1 press floor 7 button u go to floor 7 and u press 3 u go down to floor 3 etc, but if that is to difficult then it could be like 2 buttons one makes u go up a floor at a time 1 makes you go down a floor at a time etc, ty for help in advanced

Post Reply

Who is online

Users browsing this forum: No registered users and 34 guests