Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 6 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 2
Category: CoD2 Scripting
Scripting and coding with Call of Duty 2.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Previous Page
subscribe
Author Topic: Elevator Problem
kalieck
General Member
Since: Aug 9, 2006
Posts: 161
Last: Feb 14, 2009
[view latest posts]
Level 4
Category: CoD2 Scripting
Posted: Saturday, Feb. 14, 2009 09:31 am
hmm why so complicated?

i used at my elevater with some floors the funktion "moveto" and i think its much easier ... am I wrong?

greets kAl
Share |
n3BuL
General Member
Since: Nov 10, 2008
Posts: 44
Last: Jul 2, 2010
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Saturday, Feb. 14, 2009 10:08 am
Well. I want 2 triggers on it (by the way: the elevator works fine, I'm now talking about a platform you stand on, which moves along X instead of Z).
If I use the function "moveto" and 2 triggers it works - except that the triggers doesn't work. The platform moves without me triggering it.
Share |
Pedro699
General Member
Since: Jun 19, 2006
Posts: 781
Last: Dec 18, 2010
[view latest posts]
Level 7
Category: CoD2 Scripting
Posted: Saturday, Feb. 14, 2009 02:10 pm
I'm not really sure why you are having so much trouble as your elevator work fine.

You need exactly the same script for your sliding thing. The one you've posted is not the same.

I'm not really sure where the script is going, as regards the trigger on / off functions which actually don't do anything (as self is never defined) - maybe you mean something like

sliderswitch triggeroff();

Are you sure your slider switch is created in radiant properly?
Share |
n3BuL
General Member
Since: Nov 10, 2008
Posts: 44
Last: Jul 2, 2010
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Saturday, Feb. 14, 2009 04:24 pm
The trigger on/off functions works fine even though I didn't write "sliderswitch" before "triggeroff();"
I tried with and without "sliderswitch" and it worked the same way.. Then I decided to remove "sliderswitch" from the trigger on/off function since it looks better this way[tongue]


I am using the exact same script as the elevator (just with diff targetnames). I added the trigger on/off in the elevator script, and it works fine.
But I think I found the error now.. I was looking through the script and then I saw something: When replacing elevator targetnames with slider names, I accidently deleted "Down".

Before: if (level.slider)
After: if (level.sliderDown)

I'm testing it now to see if it makes a difference (I think it does [casanova])
Share |
n3BuL
General Member
Since: Nov 10, 2008
Posts: 44
Last: Jul 2, 2010
[view latest posts]
Level 2
Category: CoD2 Scripting
Posted: Saturday, Feb. 14, 2009 04:55 pm
As I thought - it works perfect [cool]
Share |
Carrottop
General Member
Since: Feb 10, 2009
Posts: 14
Last: Feb 20, 2009
[view latest posts]
Level 1
Category: CoD2 Scripting
Posted: Monday, Feb. 16, 2009 11:50 pm
uh...you guyz seem like you know a lot about this elevator/scripting thing. Me on the other hand, know NOTHING about either. I just made a pretty awesome map and i wanted to add an elevator [biggrin]

I don't want to seem demanding, but i am merely wondering if it is possible to make an elevator that goes up a certain distance, after, lets say 5 seconds, comes back down to it's original postion.

What I have already tried: The brush i am trying to move, i made it a script/brushmodel and put in targetname/elevator. Then, i made a damage trigger and put in targetname/trig_elevator. Then i made a script (.gsc) file called mp_elevator.gsc
The code inside follows:

main()
{
thread elevator();
}

elevator()
{
elevator=getent("elevator","targetname");
trig=getent("trig_elevator","targetname");
while(1)
{
trig waittill ("trigger");
elevator movez (-250,7,1.9,1.9);
elevator waittill ("movedone");
wait(1);
elevator movez (250,7,1.9,5);
elevator waittill ("movedone");
}
}

(sorry i didn't put it into the code thingy)
I put this line into my map .gsc file:
maps\mp\mp_elevator::main();

And that's what i've done. The only problem is that the trigger either doesn't work or i did something WRONG!! [cry]

I'm not even sure if this code will make the elevator do what i want (and come down after 5 seconds)....

Btw, I have no idea how to make my own scripts, i'm willing to learn but i don't even know what computer language it uses....

So if you have any info that could help me out please don't hesitate to write it down asap! thanks [biggrin]
-Carrottop
Share |
Restricted Access Topic is Locked
Page
Previous Page
subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»