| Author |
Topic: Elevator Help |
| DeekCiti |
 |
General Member Since: Mar 13, 2008 Posts: 1293 Last: Jul 9, 2016 [view latest posts] |
|
|
|
Category: CoD4 MP Mapping Posted: Sunday, Dec. 27, 2009 09:27 pm |
 |
Blade_MacTavish writes...Quote:
It isn't sloppy, it is actually well written, but it does assume you know how to create certain things. That is actually an advanced type script for an elevator. If you want to learn how to do something like that, I'm saying this from experience.
Quote: Sometimes it is better to start simple, and when you understand the simple then keep moving up until you understand the complex.
The tutorial uses some shorthand, meaning who ever wrote it assumed they can use short terms for things because he assumed the reader knows exactly what he is talking about, instead of saying and explaining every little thing and why.
When I started, I made a simple one brush platform, made it go up and down, then I added more brushes to it until I designed my own cool looking elevator. Then I learned how to add moving doors to it, you just have to work your way up, jumping into something like that, not everyone can do. Maybe you can, but I can't. I had to work my way up. |
 |
|
|
| Blade_MacTavish |
 |
General Member Since: Jun 7, 2009 Posts: 438 Last: Jul 8, 2012 [view latest posts] |
|
|
 |
|
|
|
|
Category: CoD4 MP Mapping Posted: Monday, Dec. 28, 2009 03:31 am |
 |
What exactly do you want the elevator to do? Do you want it to just go up and down, and when destination is reached, a door opens so you can walk out?
If so, you can accomplish that by first reading:
http://modsonline.com/Tutorials-read-121.html
and
http://wiki.modsrepository.com/index.php/Call_of_Duty_4:_Introduction
By the time you read those, you should have a basic understanding of at least how to make something go up and down, or left and right.
Then apply what you learn to making an elevator that suits you. You have to take what you learn and apply it to different things, since there isn't a tutorial for everything.
The guide for the complex elevator you linked above isn't written the best, but you also can't say it sucks. It's meant for more advanced people, not a beginner, which i assume you are. |
 |
|
|
| Blade_MacTavish |
 |
General Member Since: Jun 7, 2009 Posts: 438 Last: Jul 8, 2012 [view latest posts] |
|
|
 |
|
|
|
|
|
| Blade_MacTavish |
 |
General Member Since: Jun 7, 2009 Posts: 438 Last: Jul 8, 2012 [view latest posts] |
|
|
 |
|
|
| DeekCiti |
 |
General Member Since: Mar 13, 2008 Posts: 1293 Last: Jul 9, 2016 [view latest posts] |
|
|
|
Category: CoD4 MP Mapping Posted: Monday, Dec. 28, 2009 04:40 am |
 |
Blade_MacTavish writes...Quote: Still wont work
He said run it in Dev mode so you can get a detailed Error, and thus post the error Here so somebody can find out what is causing the problems.
The script might not even be the source problem. Might be the map lacking something the script is looking for. |
 |
|
|
| Luxxus |
General Member Since: Aug 19, 2007 Posts: 43 Last: Dec 28, 2009 [view latest posts] |
|
|
|
Category: CoD4 MP Mapping Posted: Monday, Dec. 28, 2009 09:06 am |
 |
have you linked your scripts together mate? :]
in mp_mapname.gsc
add
Code: maps\mp\_elevator::main();
where
Code: maps\mp\_load::main();
is :]
it's kind off hard to guess if you only say "it doesnt work"
when your map crashes hit Shift+Console
and scroll waaaay down, the take a printscreen and post it here :]
|
 |
|
|
|
|
Category: CoD4 MP Mapping Posted: Monday, Dec. 28, 2009 10:53 am |
 |
-- DELETED POST PER FORUM RULES -- |
 |
|
|
| DemonSeed |
General Member Since: Apr 30, 2009 Posts: 1362 Last: Feb 19, 2018 [view latest posts] |
|
|
 |
|
Category: CoD4 MP Mapping Posted: Monday, Dec. 28, 2009 11:07 am |
 |
Blade_MacTavish writes...Quote: Question:
bad script compile:
maps\mp\_elevator::main();
??? My script is in raw/maps/mp and its titled _elevator ... and this is what it looks like:
main()
{
level.elevatorDown = true;
level.elevatorMoving = false;
thread elevator_start();
}
elevator_start()
{
elevator = getentarray ("switch","targetname");
if ( isdefined(elevator) )
for (i = 0; i < elevator.size; i++)
elevator thread elevator_think();
}
elevator_think()
{
while (1)
{
self waittill ("trigger");
if (!level.elevatorMoving)
thread elevator_move();
}
}
elevator_move()
{
elevatormodel = getent ("elevator", "targetname");
level.elevatorMoving = true;
speed = 10;
height =581;
if (level.elevatorDown)
{
elevatormodel playsound ("elevator");
elevatormodel movez (height, speed);
elevatormodel waittill ("movedone");
level.elevatorDown = false;
}
else
{
elevatormodel playsound ("elevator");
elevatormodel movez (height - (height * 2), speed);
elevatormodel waittill ("movedone");
level.elevatorDown = true;
}
level.elevatorMoving = false;
}
Some of your script is wrong:
Code: elevator_start()
{
elevator = getentarray ("switch","targetname");
if ( isdefined(elevator) )
for (i = 0; i < elevator.size; i++)
elevator[i] thread elevator_think();
}
|
 |
|
|
|
|
mp_TempleCall of Duty: Mods: Multiplayer (624.12Kb)
|