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

Members Online

»
0 Active | 16 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: CoD Mapping
CoD 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: Hey :) first post . a very basic script problem
VAnS
General Member
Since: Jan 7, 2005
Posts: 27
Last: Aug 3, 2005
[view latest posts]
Level 2
Category: CoD Mapping
Posted: Sunday, Jan. 9, 2005 06:18 pm
well here is the script. it supposed to open a door (by moving it upwards):

main() {
simpson = getentarray ( "simpson", "targetname”);
simpson thread function();
function()
{
simpson movez ( 30, 10);
}
}


lol simpson it from the tutorial

i didnt understand the tutorial completely. im *ucked up =]


Thanks!
Share |
codmod
General Member
Since: Nov 26, 2004
Posts: 37
Last: Feb 8, 2009
[view latest posts]
Level 2
Category: CoD Mapping
Posted: Sunday, Jan. 9, 2005 06:21 pm
you sure you got the correct trigger brush etc and in the right place mate? [ohwell]



just carefully check tutorial and make sure! [smile]


the script seems right to me (i think lol!) [tongue]
Share |
SparkyMcSparks
General Member
Since: Feb 28, 2004
Posts: 1713
Last: Dec 29, 2016
[view latest posts]
Level 8
Im a fan of MODSonair
Category: CoD Mapping
Posted: Sunday, Jan. 9, 2005 06:35 pm
Code:
main() 
{
simpson = getentarray ( "simpson", "targetname”);
simpson thread function();
}

function()
{
simpson movez ( 30, 10);
}



Functions go outside of main.
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: CoD Mapping
Posted: Sunday, Jan. 9, 2005 06:42 pm
ok...well...you missed a couple of points from the tutorial

when you have more than one "simpson" and they are all going to do the same thing - then you need to get an array of them...and assign each one a number...like so:
Code:
 allsimpsons = getentarray ("simpson", "targetname");
for (i=0; i<allsimpsons.size; i++);


since you are only getting one simpson...you should be using the getent command...like so:
Code:
 simpson = getent ("simpson", "targetname"); 



i also see that you dont have a trigger call....so you need to create that in your .map (if you havent) and call on it in your script

in your .map - create a trigger_use (using textures --> common --> trigger) and draw out a trigger...right click it in 2d and select trigger --> use
bring down the entity editor and give it the targetname simpsontrigger

your script will now look something like this
Code:
 main() {
simpson = getent ( "simpson", "targetname");
trig = getent ("simpsontrigger", "targetname");
trig waittill ("triggered", other);
simpson thread function();
}
function()
{
simpson movez ( 30, 10);
}


other than that....if you have your door in your map...have made it a script_brushmodel...and given it the targetname simpson....all should work [angryalien]
Share |
VAnS
General Member
Since: Jan 7, 2005
Posts: 27
Last: Aug 3, 2005
[view latest posts]
Level 2
Category: CoD Mapping
Posted: Sunday, Jan. 9, 2005 08:01 pm
U guyz rule... really helpful 10x il try it
Share |
VAnS
General Member
Since: Jan 7, 2005
Posts: 27
Last: Aug 3, 2005
[view latest posts]
Level 2
Category: CoD Mapping
Posted: Sunday, Jan. 9, 2005 11:35 pm
oh man something is wrong... i did exactly what u typed (stryder
) and it doesnt respond to anything plus whenever i try to put a trigger brush in radiant it disappears after i deselect it :( WTF is wrong?


http://www.geocities.com/rcm3510/door.rar.zip
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: CoD Mapping
Posted: Monday, Jan. 10, 2005 12:13 am
click view --> show --> and make sure that everything has a checkmark....you will find your missing trigger...and probably some other things [angryalien]
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: CoD Mapping
Posted: Monday, Jan. 10, 2005 01:15 am
i have also created a sample map that you can look at for how things are put together - using the methods in the tutorial
you can download it here [angryalien]
Share |
VAnS
General Member
Since: Jan 7, 2005
Posts: 27
Last: Aug 3, 2005
[view latest posts]
Level 2
Category: CoD Mapping
Posted: Monday, Jan. 10, 2005 01:39 pm
Thanks dude
Share |
VAnS
General Member
Since: Jan 7, 2005
Posts: 27
Last: Aug 3, 2005
[view latest posts]
Level 2
Category: CoD Mapping
Posted: Monday, Jan. 10, 2005 03:12 pm
Ah its working ! (mine not yours) lol

now heres another issue:

main ()
{
level.doorDown=true;
simpson = getent ("door", "targetname");
trig = getent ("doortrig", "targetname");

trig waittill ("trigger");

if (level.doorDown) {
simpson movez (100,5);
simpson waittill ("movedone");
level.doorDown = false;
}

else {
simpson movez (-100,5);
simpson waittill ("movedone");
level.doorDown = true;
}


}


supposed to open a door by one [Use] and close it by anoter.

if u post the answer please explain things that u think are necesary.

i have some experience in C/php....
Share |
Restricted Access Topic is Locked
Page
Next Page
subscribe
MODSonline.com Forums : Call of Duty : CoD 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

»