Soviet's Mapping Help

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

Moderator: Core Staff

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

Post by Drofder2004 » April 22nd, 2006, 11:15 am

Luke wrote:I think you need the origin brush or it won't rotate where you want it...but you should've selected both door and origin brush and made them a script_brushmodel at the same time, if you made them separate brushmodels it won't work.
Ah, ofcourse. forgot :P Havent done rotations for a long time.

As luke said, Make the door, then make the origin brush (this will act as the "hinge") then select both and make them a script_brushmodel

:oops:
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
Soviet
Core Staff
Core Staff
Posts: 7762
Joined: April 23rd, 2005, 9:12 pm

Post by Soviet » April 22nd, 2006, 2:14 pm

ok, i did as you said and the map does not crash anymore, but the swinging door still does not work. If it is easier, could someone just tell me how to make a sliding door instead? because it really doesn't matter.

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

Post by Nightmare » April 22nd, 2006, 3:27 pm

to make the slidding door just use my tut for the moving platforms.
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
Soviet
Core Staff
Core Staff
Posts: 7762
Joined: April 23rd, 2005, 9:12 pm

Post by Soviet » April 22nd, 2006, 6:19 pm

i tried to make a sliding door using your tutorial replacing trigger_multiple with trigger_use but it didn't work. This is my script:

Code: Select all

main()
{
thread secretdoor();
}

secretdoor()
{
platform = getent ("secretdoor","targetname");
trigger = getent ("secretdoor_trigger","targetname");
while(1)
{
trigger waittill ("trigger");
wait(1);
platform moveZ (50,1,0.1,0.1);
wait(3);
platform moveZ (-50,1,0.1,0.1);
platform waittill ("movedone");
}
}
It doesn't work. I also tried moving it on the x and y axis with different time intervals. I checked several times and the names are correct. The thing i am moving is a script_brushmodel with the targetname secretdoor. The trigger is a trigger_use with the targetname secretdoor_trigger. The .gsc file is named secretdoor and is mentioned under my main .gsc. Is there anything i am missing?

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

Post by Drofder2004 » April 22nd, 2006, 8:22 pm

put iprintln's everywhere.

Code: Select all

main()
{
iprintln("Main started");
thread secretdoor();
iprintln("Secret Door Thread Run");
}

secretdoor()
{
iprintln("Secret Door Thread Started");
platform = getent ("secretdoor","targetname");
trigger = getent ("secretdoor_trigger","targetname");
while(1)
{
iprintln("While loop running");
trigger waittill ("trigger");
iprintln("Triggered");
wait(1);
platform moveZ (50,1,0.1,0.1);
iprintln("First Move");
wait(3);
platform moveZ (-50,1,0.1,0.1);
iprintln("Second Move");
platform waittill ("movedone");
iprintln("Loop Complete");
}
}
And also. Just some quick checks for common errors...

Is the file....
1. Saved as GSC and not CFG
2. Saved with the EXACT same name as the bsp
3. In the correct folder (maps\mp)
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
Soviet
Core Staff
Core Staff
Posts: 7762
Joined: April 23rd, 2005, 9:12 pm

Post by Soviet » April 22nd, 2006, 10:26 pm

put that in place of my script, absolutely no change. And checked other stuff you said. Not sure what you meant by exact same name though im guessing main .gsc, in which case it is cause all my other scripts are working

Luke
Past/Inactive Team Member
Past/Inactive Team Member
Posts: 1774
Joined: May 31st, 2005, 12:42 am
Location: Cornwall, UK

Post by Luke » April 22nd, 2006, 10:48 pm

sounds like its not running your gsc. it could be that there is another gsc with the same name conflicting with it...so maybe try naming the gsc file to something more unique.

User avatar
Soviet
Core Staff
Core Staff
Posts: 7762
Joined: April 23rd, 2005, 9:12 pm

Post by Soviet » April 23rd, 2006, 2:03 am

i changed name of .gsc and of trigger and door brushes by adding soviet in front. I also changed the main .gsc to access the new name. Still no result :(

Luke
Past/Inactive Team Member
Past/Inactive Team Member
Posts: 1774
Joined: May 31st, 2005, 12:42 am
Location: Cornwall, UK

Post by Luke » April 23rd, 2006, 2:46 am

Do you see a hint when you're near the trigger? you could also try adding the code as a new thread in the main gsc which you know is working, coz it should do something, at least one of those iprintln's should appear in game.

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

Post by Nightmare » April 23rd, 2006, 3:09 am

Soviet, if you want you can send me the .map over X-fire or MSN and I will add it.
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
Drofder2004
Core Staff
Core Staff
Posts: 13315
Joined: April 13th, 2005, 8:22 pm
Location: UK, London

Post by Drofder2004 » April 23rd, 2006, 3:48 pm

Post up all your GSC's Soviet. I'm almost 100% sure its a GSC problem and NOT a map problem.
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
Soviet
Core Staff
Core Staff
Posts: 7762
Joined: April 23rd, 2005, 9:12 pm

Post by Soviet » April 23rd, 2006, 5:08 pm

soviet_standoff.gsc

Code: Select all

main()
{
	level._effect["fire"] = loadfx ("fx/fire/tinybon.efx");
	maps\mp\_fx::loopfx("fire", (-24, 8, 32), 0.4);

	ambientPlay("ambient_mp_depot");

	maps\mp\_load::main();
	maps\mp\soviet_sound::main();
	maps\mp\stuka::main(); 
	maps\mp\soviet_elevator::main();
	maps\mp\trapdoor::main(); 
	maps\mp\sovietsecretdoor::main(); 

	game["allies"] = "russian";
	game["axis"] = "german";

	game["russian_soldiertype"] = "conscript";
	game["russian_soldiervariation"] = "normal";
	game["german_soldiertype"] = "wehrmacht";
	game["german_soldiervariation"] = "normal";

	game["attackers"] = "allies";
	game["defenders"] = "axis";
}
soviet_elevator.gsc

Code: Select all

main() { 
level.elevatorDown = true; // elevator starts at bottom: true/false 
level.elevatorMoving = false; // elevator is not currently moving 
thread elevator_start(); 
} 

elevator_start() { 
elevator = getentarray ("elevatorswitch2","targetname"); 
if ( isdefined(elevator) ) 
for (i = 0; i < elevator.size; i++) 
elevator[i] thread elevator_think(); 
} 

elevator_think() { 
while (1) { 
self waittill ("trigger"); 
if (!level.elevatorMoving) 
thread elevator_move(); 
} 
} 

elevator_move() { 
elevatormodel = getent ("elevatormodel", "targetname"); 
level.elevatorMoving = true; 
speed = 2; 
height = 192; 
wait (1); 
if (level.elevatorDown) { // moves to top 
elevatormodel playsound ("elevator1"); // sound definition for soundaliases.csv
wait (1); // wait a second to hear the motor start and then start the movement of the lift - feels more realistic
elevatormodel moveZ (-250,4,1,1); 
elevatormodel waittill ("movedone"); 
level.elevatorDown = false; 
wait (5);
elevatormodel playsound ("elevator1"); // sound definition for soundaliases.csv
wait (1);  // wait a second to hear the motor start and then start the movement of the lift - feels more realistic
elevatormodel moveZ (250,4,1,1); 
elevatormodel waittill ("movedone"); 
level.elevatorDown = true; 
} 
level.elevatorMoving = false; 
} 
soviet_sound.gsc

Code: Select all

main()
{
   thread message1();
}

message1()
{
messagetrig = getent ("fireburn","targetname");

while(1)
{
messagetrig waittill ("trigger",user);

user playSound("fireburn");

wait 3;
}
}
sovietsecretdoor.gsc

Code: Select all

main()
{
iprintln("Main started");
thread sovietsecretdoor();
iprintln("Secret Door Thread Run");
}

sovietsecretdoor()
{
iprintln("Secret Door Thread Started");
platform = getent ("sovietsecretdoor","targetname");
trigger = getent ("sovietsecretdoor_trigger","targetname");
while(1)
{
iprintln("While loop running");
trigger waittill ("trigger");
iprintln("Triggered");
wait(1);
platform moveZ (50,1,0.1,0.1);
iprintln("First Move");
wait(3);
platform moveZ (-50,1,0.1,0.1);
iprintln("Second Move");
platform waittill ("movedone");
iprintln("Loop Complete");
}
}
stuka.gsc

Code: Select all

main()
{

level thread planes();
}

planes()
{
level.PlaneSpeed = 3.5;

stuka1 = getent ("stuka1","targetname");
stuka2 = getent ("stuka2","targetname");
stuka3 = getent ("stuka3","targetname");

temp = getent (stuka1.target,"targetname");
stuka1.dest = temp.origin;
stuka1.start = stuka1.origin;
stuka1 hide();
temp = getent (stuka2.target,"targetname");
stuka2.dest = temp.origin;
stuka2.start = stuka2.origin;
stuka2 hide();
temp = getent (stuka3.target,"targetname");
stuka3.dest = temp.origin;
stuka3.start = stuka3.origin;
stuka3 hide();

wait 2;

while (1)
{
stuka1 thread plane_flyby("stuka_flyby");
wait .15;
stuka2 thread plane_flyby("stuka_flyby");
wait .15;
stuka3 thread plane_flyby("stuka_flyby");

wait 60;
}
}


plane_flyby(sound)
{
// If you specified a sound to play then play it
if (isdefined (sound))
self playsound (sound);

wait 15;

self show();

self moveto(self.dest, level.PlaneSpeed, 0.1, 0.1);

wait level.PlaneSpeed;

self hide();
self.origin = self.start;
} 
trapdoor.gsc

Code: Select all

main()
{
trapdoor();
}

trapdoor()
{

door = getent ("trapdoor","targetname"); //the door it self with the origin
door_trigger = getent ("trapdoor_trigger","targetname"); // a trigger use to activte the door

while(1)
{
door_trigger waittill ("trigger");
door rotateto ((0,0,90),1);

wait 6;

door rotateto ((0,0,0),1);
}
}
and yes, a hand comes up when i look at the trigger ingame and i also tried adding to main .gsc, didn't work

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

Post by Drofder2004 » April 23rd, 2006, 5:23 pm

Ok, do this. Move all your GSS files to another folder for now.
We are going to use a new script JUST to test this door.

So.

soviet_standoff.gsc

Code: Select all

main()
{
   maps\mp\sovietsecretdoor::main();
}
sovietsecretdoor.gsc

Code: Select all

main()
{
wait 10; // FOR TESTING
iprintln("Secret Door Thread Started");
platform = getent ("sovietsecretdoor","targetname");
trigger = getent ("sovietsecretdoor_trigger","targetname");
while(1)
{
iprintln("While loop running");
trigger waittill ("trigger");
iprintln("Triggered");
wait(1);
platform moveZ (50,1,0.1,0.1);
iprintln("First Move");
wait(3);
platform moveZ (-50,1,0.1,0.1);
iprintln("Second Move");
platform waittill ("movedone");
iprintln("Loop Complete");
}
}
Now hopefully. When you start up your map your first gsc will run. That GSC should then run the secret door GSC.
Then after 10 seconds you the thread will start.
You should now start seeing messages on the left hand side...

1. "Secret Door Thread Started"
2. "While loop running"
3. "Triggered" <-After you press the trigger.
4. "First Move" <- After 1 second
5. "Second Move" <-After another 3 seconds
6. "Loop Complete"

If you dont get any of that, then we have a map problem.
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

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests