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

Members Online

»
0 Active | 7 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 SP Mapping
Call of Duty 2 single player mapping, scripting and everything single player.
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: Drones
Boltriflemaster
General Member
Since: Aug 22, 2006
Posts: 130
Last: Nov 7, 2008
[view latest posts]
Level 4
Category: CoD2 SP Mapping
Posted: Sunday, Aug. 5, 2007 10:14 pm
Thnx, but how can i tell the spawn to actually make the drone, as in how can i make it call on the _drones.gsc file? Basically last thing ineed to know is say i give the spawn a name of dronespawn. What then wud i need to do to make it actually call onto the _drones.gsc and make the drone.

Btw, they used drones in many lvls including point-du-hoc, many british lvls, and the Demoltion lvl for russians. Ive read through their code and i still cant figure out how they triggered the drones to spawn and move.
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: CoD2 SP Mapping
Posted: Sunday, Aug. 5, 2007 11:06 pm
Hey Bolt, got your PM the other day but I had just gotten over a stomach flu so I had headaches. >_< Sorry for the late reply but hopefully this helps:

spawn_drone()
{
// Spawn him at a location
guy = spawn("script_model", (x,y,z));

// Define the AI
guy character\american_ranger_normandy_low_wet::main();

// Reference to _drones to automatically assign weapons
guy drone_allies_assignWeapon();

// Give him a targetname
guy.targetname = "drone";

// Make him an ally
guy.team = "allies";

// Not sure what this does but it's called every time a new drone is made
guy makeFakeAI();

// Assigns a fake death incase he should die
guy.fakeDeath = qFakeDeath;

// Sets up drone to become self aware and give him an idle animation as default
guy thread drone_think( self );
}

edited on Aug. 5, 2007 07:09 pm by Sparks.
Share |
Boltriflemaster
General Member
Since: Aug 22, 2006
Posts: 130
Last: Nov 7, 2008
[view latest posts]
Level 4
Category: CoD2 SP Mapping
Posted: Monday, Aug. 6, 2007 12:54 am
Yo Sparks thnx alot for that code but it gave me an error.

Unitnitialised variable = 'qFakeDeath'

Here is my .gsc

Code:

//#include maps\_utility;
//#include maps\_drones;
main()
{
maps\_load::main();




level.player takeallweapons();
level.player giveWeapon ("m1garand");
level.player giveWeapon ("fraggrenade");
level.player switchToWeapon ("m1garand");

thread spawn_drone();
}
spawn_drone()
{
// Spawn him at a location
guy = spawn("script_model", (-256,-272,40));

// Define the AI
guy character\american_ranger_normandy_low_wet::main();

// Reference to _drones to automatically assign weapons
guy drone_allies_assignWeapon();

// Give him a targetname
guy.targetname = "drone";

// Make him an ally
guy.team = "allies";

// Not sure what this does but it's called every time a new drone is made
guy makeFakeAI();

// Assigns a fake death incase he should die
guy.fakeDeath = qFakeDeath;

// Sets up drone to become self aware and give him an idle animation as default
guy thread drone_think( self );
}



Wats up with it? And thnx again for the help

edited on Aug. 5, 2007 08:55 pm by Boltriflemaster
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: CoD2 SP Mapping
Posted: Monday, Aug. 6, 2007 01:32 am
My bad, here's the correction:

qFakeDeath = false;
guy.fakeDeath = qFakeDeath;
Share |
Boltriflemaster
General Member
Since: Aug 22, 2006
Posts: 130
Last: Nov 7, 2008
[view latest posts]
Level 4
Category: CoD2 SP Mapping
Posted: Monday, Aug. 6, 2007 03:08 pm
I really appreciate all the help Sparks, but i got another error
:(

unkown function: (file 'maps\test2.gsc, line 42)

guy thread drone_think( self );

I think it might not be calling on the _drones file since it seems to not be able to find the drone_think thread. But im a noob at coding so i wouldn tknow if i am calling on it correctly.


Code:

//#include maps\_utility;
//#include maps\_drones;
main()
{
maps\_load::main();




level.player takeallweapons();
level.player giveWeapon ("m1garand");
level.player giveWeapon ("fraggrenade");
level.player switchToWeapon ("m1garand");

thread spawn_drone();
}
spawn_drone()
{
// Spawn him at a location
guy = spawn("script_model", (-256,-272,40));

// Define the AI
guy character\american_ranger_normandy_low_wet::main();

// Reference to _drones to automatically assign weapons
guy drone_allies_assignWeapon();

// Give him a targetname
guy.targetname = "drone";

// Make him an ally
guy.team = "allies";

// Not sure what this does but it's called every time a new drone is made
guy makeFakeAI();

// Assigns a fake death incase he should die
qFakeDeath = false;
guy.fakeDeath = qFakeDeath;

// Sets up drone to become self aware and give him an idle animation as default
guy thread drone_think( self );
}

Share |
soulwax
General Member
Since: Nov 14, 2005
Posts: 255
Last: Jul 28, 2008
[view latest posts]
Level 5
Category: CoD2 SP Mapping
Posted: Monday, Aug. 13, 2007 01:26 pm
maybe guy thread drone_think("self"); ?
Share |
Boltriflemaster
General Member
Since: Aug 22, 2006
Posts: 130
Last: Nov 7, 2008
[view latest posts]
Level 4
Category: CoD2 SP Mapping
Posted: Tuesday, Aug. 14, 2007 04:04 pm
Thnx for help, it didnt work, sparks, i know u gave me the script. Thnx for it mate. But i know that the game isnt calling on the _drones.gsc file. Thats why the ENTIRE script is buggy. Can some1 show me how to properly call on another script for that segment of code?
Share |
Restricted Access Topic is Locked
Page
Previous Page
subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 SP 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

»