MODSonline
  Welcome Guest to MODSonline Home | Forums | Register | Login
Main-Menu
Home
Login
Register
Add Download
Add News
Add Tutorial *
Forums

Advertise
Affiliate Store US *
Affiliate Store UK *
Affiliate Store CA *
Angry Letter Generator
Avatar Upload
Calendar of Games
Contact
Downloads
FAQs
Forums
Member List
Member Projects
News
News Grabber *
Policy
Polls
Private Messages
Reviews
Screenshot Gallery
Search
Servers - Game
Store - Shirts *
Subscribe
Topics
Tutorials
Weblinks
Wiki *
Tutorials
CoD Mapping
CoDUO Mapping
CoD2 Mapping
CoD4 Mapping
CoDWW Mapping
CoD FAQs
HL2 Mapping
HL2 FAQs
SOF1 Mapping
Crysis Mapping
Q4 Mapping
Doom 3 Mapping
Doom 3 FAQs
UT2K3 Mapping
SOF2 Mapping
SOF2 FAQs

Lightray Modeling
General Modeling
General Modding
Adobe Photoshop
Common Mapping Errors

Readme.txt Generator
Members-Online
techno2sl [Today]
Kill_me_now [Downl]
commandux [Tutor]
Tristan4592 [Forum]
Sevenz [Forum]
Blimp01 [Today]
supersword [Tutor]
scillman [Forum]
cornrow_wa... [Today]
Tally [Forum]
SodBusterMan [Today]

11 Members and 17 Guests
Chat MODSonline
0 People Now Chatting
MODSOnline TeamSpeak

download TeamSpeak

In-The-News
Monday, Dec. 1st
A message from foyleman
Sunday, Nov. 30th
MODSonair 156 Live
Friday, Nov. 28th
MODSonair Episode 155
Wednesday, Nov. 26th
MODSonair Forum Buttons
Monday, Nov. 24th
Holiday Gift Guide 2008 - PC
Latest Poll
Single or Multiplayer maps for World at War?
Single-Player 30.23%
Multiplayer 61.63%
WHAT!? The tools are out? 8.14%
Read More...
10 comments

Newsletter
Name:
Email:
Newsletter Archives
Your Membership
User Name:
Password:
Register.
In The Forums
Appreciation
MODSonline.. Posts: (1) Views: (6) by Watter
pathnode placement
CoD:WW Level Des.. Posts: (18) Views: (110) by Sgt.Rampage
Left 4 Dead SDK?
Left 4 Dead Leve.. Posts: (6) Views: (35) by Welshy
nazi_zombie problem with map : (
CoD:WW Level Des.. Posts: (3) Views: (37) by -DoT-Demon
Art of War Central Quake 4 Mods for Dummies
CoDWW Download
Forums
MODSonline.com 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, rEdrUmMDK, Foxhound, Wyatt_Earp, Rasta, StrYdeR, The_Caretaker, Cypher2004, batistablr, Welshy
Latest Posts
Subscribed Posts
Search
Restricted Access Restricted Access subscribe
Author Topic: 2 script for one object
Ejpi16
General Member
Since: Sep 25, 2008
Posts: 2
Last: Oct 29, 2008
[view latest posts]
Level 0
Category: CoD2 Scripting
Posted: Sunday, Oct. 12, 2008 11:55 am
Hello everyone,

I am making an map, in this map i have a little jail.

The ground of the jail must be move every 20 seconds.

i use this code:

Code:



It moves on the x-as

Now you can save the ppl who are in jail by pressin a trigger.

For that i use this code:

Code:


Those 2 things work fine but not when the first script is running and you press the trigger button, my orig is out of place.

I do not know how to do it at all.
How to make this so it run only one of the 2 script?
It needs to do the move every 20 seconds but then the script is bussy whit moving then you can not press the trigger button.

Hope you can help me

[wave] Ejpi16
COLMAC
General Member
Since: Sep 15, 2006
Posts: 618
Last: Dec 2, 2008
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Monday, Oct. 13, 2008 04:17 pm
heres a script that i use that works
as many doors as you want,

in radiant make a brush of halfyour door copy it put them side by side make them both script_brushmodel unselect them now use the entity box,key-value, select the left door give it name script_noteworthy left_door unselect it now do the right piece name script_noteworthy right_door
now unselect everything , make a trigger use_touch add this for a name that you would like to show when someone comes to the door hintstring and quote open
now give it a targetname doortrig hit enter and unselect
now select the triggr and left_door, hit W unselect
now select the trigger again and right_door, hit W unselect
the doors should now be targetnamed , auto1 and the trigger should be target auto1 save as prefab
this door will open only 1 way if you rotate 90% it will slide wrong






Code:


to make it lift instead just change this

self.left_door moveZ(-61,2,0.5,0.5);
wait 3.5;
self.left_door moveZ(61,2,0.5,0.5);
wait 3.5;

notice i used left door only and it should be named that,
also if you run 2 scripts you need to name it door_1 and door_2 as well as doortrig_1 and doortrig_2 ,so it runs only that door



use left doors for one side of the cell block, and right door for either side of the cell block for sliders "note you may need to change the x to y if the doors move the wrong way as weel make it move (61,2,0.5,0.5); as a single door to open wide

with this script i run door_1,door_2 and, door_3 as a lift, in my air_ship map

heres a link to my tuts for doors
http://www.dazewarfare.clanservers.com/e107/e107_plugins/forum/forum_viewtopic.php?41

rasta - fixed code

edited on Oct. 13, 2008 04:49 pm by Rasta
ukdjaj
General Member
Since: Jun 1, 2008
Posts: 2046
Last: Nov 23, 2008
[view latest posts]
Level 8
Category: CoD2 Scripting
Posted: Monday, Oct. 13, 2008 04:50 pm
COLMAC, please use a code box for script please.

and ejpi16 try combining the two scripts with the triggeron(); function and the triggeroff(); function

also if u haven't already read the getting started in scripting tutorial in cod1 section put it see's asthough u have grasped it already.

thanks ukdjaj
COLMAC
General Member
Since: Sep 15, 2006
Posts: 618
Last: Dec 2, 2008
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Monday, Oct. 13, 2008 05:48 pm
lol rasta i had it startrek doors that slide apart
thats why it was x one side y either
but the in this code ,xyz can be made to fit all maps
and as may doors as you want
Rasta
Preferred Member
Since: Apr 10, 2004
Posts: 4339
Last: Dec 2, 2008
[view latest posts]
Level 9
Forum Moderator
Im a fan of MODSonair
Im a HOST of MODSonair
Category: CoD2 Scripting
Posted: Monday, Oct. 13, 2008 06:06 pm
COLMAC writes...
Quote:
lol rasta i had it startrek doors that slide apart
thats why it was x one side y either
but the in this code ,xyz can be made to fit all maps
and as may doors as you want


I only put your code in a code box, i didnt alter it in any way.
Go ahead... You Play I Mod : MODSonline.com
Support Modsonline by becoming a PREFERRED MEMBER today
Have you heard the MODSonair Podcast?: www.modsonair.com
We are game enthusiasts from the MODSonline.com community bringing you news, updates and opinions of the week's current events. Tune in every Friday for a new episode.
COLMAC
General Member
Since: Sep 15, 2006
Posts: 618
Last: Dec 2, 2008
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Monday, Oct. 13, 2008 06:14 pm
crap sorry,
its right, i just been jumping around to much today while trying to make textures
as for his Question he needed only name trig_1 and trig_2
and the prefabs as well [duh]
Restricted Access Restricted Access subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting
All logos and trademarks and information in this site are property of MODSonline LLC © 2008.
The comments are property of their posters.
RSS news feeds for MODSonline can be found News.php.
Intergi
Partners
The Firing Box
XoXide
Battle for Europe COD2
Call of Duty Headquarters
modbase.be
CODAddicts - Call of Duty News & Downloads
Frag Universe
Ask About
Advertising
Friends
SOF2 Files and Downloads
Volcano
Canada Kicks Ass Clan
Ask About
Advertising
Link to Us
MODSonair
View in iTunes
Please help us to raise in the ranks of podcasting and subscribe to our itunes feed using the link above.
MODSonair Releases
MODSonair Episode 155
MODSonair Episode 154
MODSonair Episode 153
MODSonair Episode 152
MODSonair Episode 151
Next Show
The next MODSonair show will air LIVE on:

Time remaining:
Copyright © 2008 MODSonline
Tresware Content Management System Copyright © 2008 Tresware
Website Designed and Hosted   Tresware