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

Members Online

»
0 Active | 14 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
Category: CoDUO Mapping
CoD United Offensive mapping and level design.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Next Page
subscribe
Author Topic: moving objects with a trigger!
getmapsfergy
General Member
Since: Mar 15, 2004
Posts: 42
Last: Mar 24, 2005
[view latest posts]
Level 2
Category: CoDUO Mapping
Posted: Tuesday, Nov. 16, 2004 06:57 pm
okay here's my dilema...i got this bridge that is over a canal (moat) around a castle, and i want to be able to hit a switch and make it retract so the bridge don't cross the canal anymore. I've tried everything and can't get it to work. In the map "amusement park" you can hit a switch and a train moves to the end of the tracks and then moves back...looked at the .gsc file for the scripts, found em, modified em, but to no luck...won't move an inch. Could someone with more knowledge on scripting help me out!!! This is one of the main focal points to my map, and it's killing it! HELP!!!!

Share |
Azz
General Member
Since: Jul 29, 2004
Posts: 901
Last: Aug 13, 2010
[view latest posts]
Level 7
Category: CoDUO Mapping
Posted: Tuesday, Nov. 16, 2004 07:12 pm
Hi GMF,, Amuzement Park is my Sons map,, he only 13 but a devil at this scripting lark.
Will your bridge lift like a drawbridge or do you want it to slide back from the moat?
Share |
adwamslayer
General Member
Since: Feb 7, 2004
Posts: 481
Last: Jan 4, 2007
[view latest posts]
Level 5
MODSCON
Category: CoDUO Mapping
Posted: Tuesday, Nov. 16, 2004 07:26 pm
Take a look at the "getting started in scripting(movingthings) tutorial. This tells you hove to rotate and move on the x y and z axis
Share |
Azz
General Member
Since: Jul 29, 2004
Posts: 901
Last: Aug 13, 2010
[view latest posts]
Level 7
Category: CoDUO Mapping
Posted: Tuesday, Nov. 16, 2004 07:31 pm
Yes as Adwam says thats the tut.. i was trying to remember what it was called and have just found my printout of it.
That should do the trick.
Good luck A [casanova]
Share |
getmapsfergy
General Member
Since: Mar 15, 2004
Posts: 42
Last: Mar 24, 2005
[view latest posts]
Level 2
Category: CoDUO Mapping
Posted: Tuesday, Nov. 16, 2004 10:36 pm
azz it will move along the y axis...i've read the tut and still no go...wondering if I got something mixed up...

here's a screeny of the bridge and the dir. of movement and what i have the targetnames and target of...





here's the .gsc file of the bridge script anyone see a problem? I don't but it wont work!

Code:

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 ("bridgemove","targetname");
if ( isdefined(elevator) )
for (i = 0; i < elevator.size; i++)
elevator thread elevator_think();
}

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

elevator_move() {
elevatormodel = getent ("bridge", "targetname");
level.elevatorMoving = true;
speed = 5;
height = 400;
wait (1);
if (level.elevatorDown) { // moves to top
elevatormodel movey (height, speed);
elevatormodel waittill ("movedone");
level.elevatorDown = false;
}
else { // moves to bottom
elevatormodel movey (height - (height * 2), speed);
elevatormodel waittill ("movedone");
level.elevatorDown = true;
}
level.elevatorMoving = false;
}




Please help!!!!
Share |
Azz
General Member
Since: Jul 29, 2004
Posts: 901
Last: Aug 13, 2010
[view latest posts]
Level 7
Category: CoDUO Mapping
Posted: Tuesday, Nov. 16, 2004 10:49 pm
Arrrr.. I see your using elevator script.
I would have to wait till Son gets here to check that out and that wont be till Fri. m8

Sorry to be a pain but is that last pic looking from above does the player get on then trigger it to move?

If so all you need is the "moveto" script
You say you have looked at the script my Son used to move the little train in Amuzement park, can you not copy that and just change the trigger and brushmodel names to match yours? You have included the origin in the script_model havnt you?
Would you like me to mail you another .gsc with a moveto script?
Share |
getmapsfergy
General Member
Since: Mar 15, 2004
Posts: 42
Last: Mar 24, 2005
[view latest posts]
Level 2
Category: CoDUO Mapping
Posted: Tuesday, Nov. 16, 2004 11:43 pm
the object of this bridge is this...allies start out in a town..and move forward through a town to reach a castle...where the main objectives are. There will be like 4 ways in...1 will include this bridge that the you can "pull back" across the pond by push a switch in the guard house next to the bridge.

I am using the elevator script seeing how is was the only one that i could find...i'm gonna try to use the train script from the amusementpark pk3. Hopefully this can get working.

ps. Those pics are from above
Share |
StrYdeR
General Member
Since: May 11, 2004
Posts: 11671
Last: Oct 7, 2021
[view latest posts]
Level 10
Admin
Forum Moderator
Im a HOST of MODSonair
Category: CoDUO Mapping
Posted: Wednesday, Nov. 17, 2004 01:40 am
i have a couple of questions...then ill start with the suggestions

why are you targeting your brushmodels with your trigger (you dont need to...but it can be done either way)?

why do i see script_brushmodel represented twice on your map...the entity you move must be 1 script_brushmodel, therefore it would only show once?

why are you using an origin if you are scripting a sliding movement? (your bridge will retract on the y axis, as the origin of your bridge itself will be 0,0,0)...ummm.....this goes back to the entity "self" and self.origin is relevent to self...not the map....so an entities self.origin is going to be 0,0,0 where on the map it could be completely different....i hope i explained that so you could understand it

suggestions:

remake your script_brushmodel....simply select all then ungroup...then select them all again and make into a script_brushmodel

in your gsc....an array calls on MULTIPLE objects with the same targetname
from the look of your pic there is only one trigger....so use getent instead of getentarray...(you dont have to build the table then either

in your gsc you call on your trigger like this
Code:
self waittill ("bridgemove");  

a trigger has to wait for "triggered" it is the only thing it will respond to

it looks like the map i was going to do for the suppliments will HAVE to get done now lol

[angryalien]
Share |
getmapsfergy
General Member
Since: Mar 15, 2004
Posts: 42
Last: Mar 24, 2005
[view latest posts]
Level 2
Category: CoDUO Mapping
Posted: Wednesday, Nov. 17, 2004 02:10 am
to styder...thanks for the suggestions. I have three "script_brushmodels" these are: 1) the bridge floor 2) the left railing, and 3) the right railing. So what i'm getting is to make em so they are 1 "script_brushmodel". I didn't know that! Also about putting an origin, thought you needed one by the tut. but it didn't mention about slidding something like this so i thought i was right, guess not. I had no idea about triggering, this is first time doing anything like this, so I'll take your suggestion and try it. I'll go and make these implements and get back to ya! But yup...i think i'll need a good working .gsc file to find out my mistakes. Thanks for the help!
Share |
StrYdeR
General Member
Since: May 11, 2004
Posts: 11671
Last: Oct 7, 2021
[view latest posts]
Level 10
Admin
Forum Moderator
Im a HOST of MODSonair
Category: CoDUO Mapping
Posted: Wednesday, Nov. 17, 2004 02:49 am
you are trying and that is great! [pimp]

your basic idea was right...only needs a little tweaking

let me know what happens [angryalien]
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty : CoDUO Mapping

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

»