Author |
Topic: When making maps, can ur teammates never die? |
.KiLL3R. |
|
General Member Since: Oct 26, 2006 Posts: 1437 Last: Jul 3, 2017 [view latest posts] |
|
|
|
Scratchy |
|
General Member Since: Feb 10, 2006 Posts: 276 Last: Mar 16, 2009 [view latest posts] |
|
|
|
.KiLL3R. |
|
General Member Since: Oct 26, 2006 Posts: 1437 Last: Jul 3, 2017 [view latest posts] |
|
|
|
sam_fisher3000 |
|
General Member Since: Apr 18, 2007 Posts: 816 Last: Jul 16, 2016 [view latest posts] |
|
|
|
Category: CoD2 MP Mapping Posted: Tuesday, Nov. 27, 2007 09:55 pm |
|
Scratchy writes...Quote: sam_fisher3000 writes...Quote: So ur saying that I can make more than one gsc file.
This is my first one
main()
{
maps\_load::main();
level.player takeallweapons();
level.player giveWeapon("m1carbine");
level.player giveWeapon("thompson");
level.player giveWeapon("fraggrenade");
level.player switchToWeapon("thompson");
}
My second one is
main()
{
thread ally_nodamage();
}
ally_nodamage()
{
allyteam =getentarray ("ally", "targetname");
for(i=0;i
allyteam thread maps\_utility::magic_bullet_shield();
}
However, doesnt these two files have the same name or else it wouldnt work? U cant have the same name or else one will replace the other. So well, ur saying that I make another gsc file and apply "(map\mp\magicscript::main();) in your Main() function". I will have to apply it at the beginning right? Then the rest is something else right? I hope I am right.
Ok look. You have your Maps GSC, which is named after your map, and is runned when your map is runned. You make another GSC (call it watever you want to) and then call it from your Maps GSC. So here i what it should look like...
main()
{
maps\_load::main();
maps\mp\magic::main();
level.player takeallweapons();
level.player giveWeapon("m1carbine");
level.player giveWeapon("thompson");
level.player giveWeapon("fraggrenade");
level.player switchToWeapon("thompson");
}
^^This one is named after your map^^
Now you have a second GSC file named magic and in it is this...
main()
{
thread ally_nodamage();
}
ally_nodamage()
{
allyteam =getentarray ("ally", "targetname");
for(i=0;i
allyteam thread maps\_utility::magic_bullet_shield();
}
And make sure you have your actors with the targetname ally
edited on Nov. 26, 2007 09:10 pm by Scratchy
ok back to the topic on scripting. So ur saying that wutever has the word main or maps\mp or wutever have to go into 1 gsc file along with the weapons scripting? The others go into a seperate GSC file? So wutever is the main thing like the map starter scripts have to go into one file. The rest go into a seperate file. Even though they are not related like a tank script or the infinite health have to be seperated and in 2 different gsc file. Is that wut ur saying? Or can I put 2 different things together on the second gsc file? |
|
|
|
Scratchy |
|
General Member Since: Feb 10, 2006 Posts: 276 Last: Mar 16, 2009 [view latest posts] |
|
|
|
sam_fisher3000 |
|
General Member Since: Apr 18, 2007 Posts: 816 Last: Jul 16, 2016 [view latest posts] |
|
|
|
|
94sniper |
|
General Member Since: Jun 15, 2007 Posts: 907 Last: Jun 22, 2009 [view latest posts] |
|
|
Category: CoD2 MP Mapping Posted: Tuesday, Nov. 27, 2007 10:21 pm |
|
sam_fisher3000 writes...Quote: I still want to know how to script by myself too.
do you by chance know C scripting? if not, C is a good base idea. I consider CoD scripting a 1up version of C. actually I'm learning C right now. I'm kinda going backwards with all of CoD. first CoD2, then CoD, then CoD4, now It's all at once... |
|
|
|
sam_fisher3000 |
|
General Member Since: Apr 18, 2007 Posts: 816 Last: Jul 16, 2016 [view latest posts] |
|
|
|
|
94sniper |
|
General Member Since: Jun 15, 2007 Posts: 907 Last: Jun 22, 2009 [view latest posts] |
|
|
Category: CoD2 MP Mapping Posted: Tuesday, Nov. 27, 2007 10:36 pm |
|
or you could use a tutorial! such as the one found here. There are other tutorials for sripting. and incase you don't already know, CoD, CoD2, and Cod4 scripting is pretty much the exact same. it's got the same layout which is really helpful for modders/mappers to switch from game to game. |
|
|
|
TexasRebel |
General Member Since: May 1, 2006 Posts: 373 Last: Aug 20, 2013 [view latest posts] |
|
|
|